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

Paul Sandoz paul.sandoz at oracle.com
Thu Oct 8 12:35:45 EDT 2015


> On 8 Oct 2015, at 18:33, mark.reinhold at oracle.com wrote:
> 
> 2015/10/8 7:56 -0700, dl at cs.oswego.edu:
>>>> ...
>>>> 
>>>> class Thread { //
>>>>    /**
>>>>     * A hint to the platform that the current thread is momentarily
>>>>     * unable to progress. ... add more guidance ...
>>>>     */
>>>>     void spinYield();
>> 
>> should be:
>>       public static void spinYield();
> 
> Yes -- let's keep this simple.  It's just one method, another hint
> in j.l.Thread which can be ignored (or not) by the VM.
> 
> This concept seems sufficiently well understood, based on its use
> in other platforms, that putting it directly into j.l.Thread is not
> a huge risk.  I don't see a strong need for this to start out as a
> JDK-specific API.
> 

+1

Paul.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20151008/da84a17a/attachment.bin>


More information about the Concurrency-interest mailing list