[concurrency-interest] JDK 9 FutureTask's use of Thread.yield
akarnokd at gmail.com
Thu Feb 2 08:01:51 EST 2017
I'm trying to port some some building blocks of Java's ExecutorServices to
less fortunate platforms and I've noticed FutureTask of JDK 9 uses
Thread.yield in some of its spin loops (
for example) to wait some other party to finish up.
Maybe this was discussed before, but wouldn't it make more sense to have
Thread.onSpinWait() at these locations (now that it is available) just by
itself or as a code that leads to the current Thread.yield() approach?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest