[concurrency-interest] Canceling Futures - Callable implementations
joe.bowbeer at gmail.com
Thu Apr 9 14:20:33 EDT 2009
I was wondering if Thread.yield would raise a flag. (If this were a real
code sample, it should raise a flag.)
I added Thread.yield, half as a joke, to indicate that my example was
Thread.yield is a suggestion to the JVM that maybe there is better use of
the CPU elsewhere. In this instance, I hope the JVM takes the hint, but I
don't care. (Well, I would care if I ran my code on a non-preemptive
I don't know which platforms ignore Thread.yield and which don't.
2009/4/9 Péter Kovács
> Just one more question:
> I noticed the Thread.yield() calls in your samples. I thought this
> call had any real effect only back when green threads were used. Can
> it still make any difference?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest