static boolean park(Object blocker, ParkAction postParkActions) throws SuspendExecution { return park(blocker, postParkActions, 0, null); }
@Override public void await() throws SuspendExecution { Fiber.park(this); }
@Override public void await(long timeout, TimeUnit unit) throws SuspendExecution { Fiber.park(this, timeout, unit); }
public static void park(Object blocker) throws SuspendExecution { park(blocker, null, 0, null); }
public static void park() throws SuspendExecution { park(null, null, 0, null); }
public static void park(Object blocker) throws SuspendExecution { park(blocker, null, 0, null); }
public static boolean park(Object blocker, PostParkActions postParkActions) throws SuspendExecution { return park(blocker, postParkActions, 0, null); }
public static void park() throws SuspendExecution { park(null, null, 0, null); }
public static boolean park(Object blocker, long timeout, TimeUnit unit) throws SuspendExecution { return park(blocker, null, timeout, unit); }
public static void park(long timeout, TimeUnit unit) throws SuspendExecution { park(null, null, timeout, unit); }
public static boolean park(PostParkActions postParkActions) throws SuspendExecution { return park(null, postParkActions, 0, null); }
public static void parkNanos(long nanos) throws SuspendExecution, InterruptedException { if (Fiber.currentFiber() != null) Fiber.park(nanos, TimeUnit.NANOSECONDS); else LockSupport.parkNanos(nanos); }
public static void parkNanos(Object blocker, long nanos) throws SuspendExecution, InterruptedException { if (Fiber.currentFiber() != null) Fiber.park(blocker, nanos, TimeUnit.NANOSECONDS); else LockSupport.parkNanos(blocker, nanos); }
public static boolean park(Object blocker, long timeout, TimeUnit unit) { try { return Fiber.park(blocker, timeout, unit); } catch (SuspendExecution e) { throw RuntimeSuspendExecution.of(e); } }
public static void park(long timeout, TimeUnit unit) { try { Fiber.park(timeout, unit); } catch (SuspendExecution e) { throw RuntimeSuspendExecution.of(e); } }
public static void park(Object blocker) { try { Fiber.park(blocker); } catch (SuspendExecution e) { throw RuntimeSuspendExecution.of(e); } }
public static void park() { try { Fiber.park(); } catch (SuspendExecution e) { throw RuntimeSuspendExecution.of(e); } }
@SuppressWarnings("empty-statement") public V run() throws E, SuspendExecution { final FiberCallback handler = new FiberCallback(); while(!Fiber.park(this, handler)) // make sure we actually park and run PostParkActions ; while (!handler.isCompleted()) Fiber.park(this); return handler.getResult(); }
public static void park() throws SuspendExecution, InterruptedException { if (Fiber.currentFiber() != null) Fiber.park(); else LockSupport.park(); }
public static void park(Object blocker) throws SuspendExecution, InterruptedException { if (Fiber.currentFiber() != null) Fiber.park(blocker); else LockSupport.park(blocker); }