@Test void example_1() throws Exception { while (!flag.compareAndSet(false, true)) { OnSpinWaitJDK8Adapter.onSpinWaitOrNothing(); } }
static boolean onSpinWaitOrNothing() { if (ON_SPIN_WAIT_HANDLE != null) { try { ON_SPIN_WAIT_HANDLE.invokeExact(); return true; } catch (Throwable ignore) { } } return false; }
OnSpinWaitJDK8Adapter { static boolean onSpinWaitOrNothing() { if (ON_SPIN_WAIT_HANDLE != null) { try { ON_SPIN_WAIT_HANDLE.invokeExact(); return true; } catch (Throwable ignore) { } } return false; } }
OnSpinWaitJDK8Adapter { static boolean onSpinWaitOrNothing() { if (ON_SPIN_WAIT_HANDLE != null) { try { ON_SPIN_WAIT_HANDLE.invokeExact(); return true; } catch (Throwable ignore) { } } return false; } private  OnSpinWaitJDK8Adapter(); }
OnSpinWaitJDK8Adapter { static boolean onSpinWaitOrNothing() { if (ON_SPIN_WAIT_HANDLE != null) { try { ON_SPIN_WAIT_HANDLE.invokeExact(); return true; } catch (Throwable ignore) { } } return false; } private  OnSpinWaitJDK8Adapter();  }
OnSpinWaitJDK8Adapter { static boolean onSpinWaitOrNothing() { if (ON_SPIN_WAIT_HANDLE != null) { try { ON_SPIN_WAIT_HANDLE.invokeExact(); return true; } catch (Throwable ignore) { } } return false; } private  OnSpinWaitJDK8Adapter();   }