[infinispan-dev] Runtime.onSpinWait()

Ladislav Thon lthon at redhat.com
Thu Jan 28 02:04:49 EST 2016


> Any idea how HotSpot would optimize spin-waiting? The patch contains
> just the method definition...

IIUC, it's supposed to emit the PAUSE instruction on x86; can be a noop
(or any other architecture-specific insn) on other architectures.

LT

> 
> Cheers
> Dan
> 
> 
> On Wed, Jan 27, 2016 at 6:41 PM, Sanne Grinovero <sanne at infinispan.org> wrote:
>> Hello all,
>> I've been following the discussion about onSpinWait(), it seems JDK9
>> might get it.
>>
>> That looks quite interesting, especially after having noticed that
>> sometimes we "burn CPU" while we could hint that the thread should
>> rather be descheduled.
>>
>> http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-January/038361.html
>>
>> Thanks,
>> Sanne
>> _______________________________________________
>> infinispan-dev mailing list
>> infinispan-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
> 



More information about the infinispan-dev mailing list