[concurrency-interest] On park and unpark

Andrew Haley aph at redhat.com
Fri Aug 25 11:12:11 EDT 2017

On 25/08/17 12:12, Doug Lea wrote:
> BTW, on linux, it should be more efficient to implement using
> Futex instead of the current scheme based on original Solaris
> version. But no one has ever volunteered to do this.

I've done it, and could not measure any difference.  In the case where
the kernel blocks, the additional savings from not doing the
mutex/condvar are small: syscall overhead dominates.  In the case
where we return immediately it makes no difference because we (almost)
never get as far as the futex call.  So I never submitted the patch.

Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671

More information about the Concurrency-interest mailing list