Skip to content

Latest commit

 

History

History
8 lines (5 loc) · 465 Bytes

README.md

File metadata and controls

8 lines (5 loc) · 465 Bytes

onSpinWaitMultiReleaseJar

This makefile builds a jar that works with and JDK from 6 to 9 (and beyond). Just add this jar to the classpath and insert ThreadHints.onSpinWait() whereever you have a busy loop.

There is a simple example that you can use as a depo and also PrintAssembly to verify that the pause instruction is indeed being used (Your would need a Hotspot Disassembler for a proper print).

On my TODO list: convert this Makefile into a maven build.