[concurrency-interest] Spin Loop Hint support: Draft JEP

Martin Thompson mjpt777 at gmail.com
Tue Dec 1 08:17:02 EST 2015

> Date: Tue, 1 Dec 2015 07:16:24 -0500
> From: Vitaly Davidovich <vitalyd at gmail.com>
>         <hotspot-dev at openjdk.java.net>, concurrency-interest at cs.oswego.edu
> Subject: Re: [concurrency-interest] Spin Loop Hint support: Draft JEP
>         proposal
> Minor quibble, but why the "on" prefix in the name? Maybe just me, but
> onXYX is typically used for event notification style APIs.
> Also, the "wait" part seems inappropriate as the method itself isn't doing
> any waiting.  What was wrong with the original spinLoopHint name? Or
> cpuRelax()?

Relax was a suggested name that fits with the current Linux kernel
convention. However it was felt this suggested implementation rather than
notifying state.

The "on" prefix was suggested as the caller is notifying the runtime that
it is in a spin-wait loop. This allows the runtime the option of reacting
to the event, or not, and allows flexibility in how it chooses to react to
this information. The method is not waiting; the method is notifying that
the caller is waiting.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20151201/bf351c78/attachment.html>

More information about the Concurrency-interest mailing list