parkState = ParkState.UNPARKED; } else { parkFor(delayMillis * NANOS_PER_MILLI);
/** * Parks the calling thread for the specified amount of time, * unless the "permit" for the thread is already available (due to * a previous call to {@link #unpark}. This method may also return * spuriously (that is, without the thread being told to unpark * and without the indicated amount of time elapsing). * * <p>See {@link java.util.concurrent.locks.LockSupport} for more * in-depth information of the behavior of this method.</p> * * @param absolute whether the given time value is absolute * milliseconds-since-the-epoch (<code>true</code>) or relative * nanoseconds-from-now (<code>false</code>) * @param time the (absolute millis or relative nanos) time value */ public void park(boolean absolute, long time) { if (absolute) { Thread.currentThread().parkUntil(time); } else { Thread.currentThread().parkFor(time); } }
parkState = ParkState.UNPARKED; } else { parkFor(delayMillis * NANOS_PER_MILLI);
parkState = ParkState.UNPARKED; } else { parkFor(delayMillis * NANOS_PER_MILLI);
/** * Parks the calling thread for the specified amount of time, * unless the "permit" for the thread is already available (due to * a previous call to {@link #unpark}. This method may also return * spuriously (that is, without the thread being told to unpark * and without the indicated amount of time elapsing). * * <p>See {@link java.util.concurrent.locks.LockSupport} for more * in-depth information of the behavior of this method.</p> * * @param absolute whether the given time value is absolute * milliseconds-since-the-epoch (<code>true</code>) or relative * nanoseconds-from-now (<code>false</code>) * @param time the (absolute millis or relative nanos) time value */ public void park(boolean absolute, long time) { if (absolute) { Thread.currentThread().parkUntil(time); } else { Thread.currentThread().parkFor(time); } }
parkState = ParkState.UNPARKED; } else { parkFor(delayMillis * NANOS_PER_MILLI);
/** * Parks the calling thread for the specified amount of time, * unless the "permit" for the thread is already available (due to * a previous call to {@link #unpark}. This method may also return * spuriously (that is, without the thread being told to unpark * and without the indicated amount of time elapsing). * * <p>See {@link java.util.concurrent.locks.LockSupport} for more * in-depth information of the behavior of this method.</p> * * @param absolute whether the given time value is absolute * milliseconds-since-the-epoch (<code>true</code>) or relative * nanoseconds-from-now (<code>false</code>) * @param time the (absolute millis or relative nanos) time value */ public void park(boolean absolute, long time) { if (absolute) { Thread.currentThread().parkUntil(time); } else { Thread.currentThread().parkFor(time); } }
parkState = ParkState.UNPARKED; } else { parkFor(delayMillis * NANOS_PER_MILLI);
parkState = ParkState.UNPARKED; } else { parkFor(delayMillis * NANOS_PER_MILLI);
parkState = ParkState.UNPARKED; } else { parkFor(delayMillis * NANOS_PER_MILLI);
/** * Parks the calling thread for the specified amount of time, * unless the "permit" for the thread is already available (due to * a previous call to {@link #unpark}. This method may also return * spuriously (that is, without the thread being told to unpark * and without the indicated amount of time elapsing). * * <p>See {@link java.util.concurrent.locks.LockSupport} for more * in-depth information of the behavior of this method.</p> * * @param absolute whether the given time value is absolute * milliseconds-since-the-epoch (<code>true</code>) or relative * nanoseconds-from-now (<code>false</code>) * @param time the (absolute millis or relative nanos) time value */ public void park(boolean absolute, long time) { if (absolute) { Thread.currentThread().parkUntil(time); } else { Thread.currentThread().parkFor(time); } }
/** * Parks the calling thread for the specified amount of time, * unless the "permit" for the thread is already available (due to * a previous call to {@link #unpark}. This method may also return * spuriously (that is, without the thread being told to unpark * and without the indicated amount of time elapsing). * * <p>See {@link java.util.concurrent.locks.LockSupport} for more * in-depth information of the behavior of this method.</p> * * @param absolute whether the given time value is absolute * milliseconds-since-the-epoch (<code>true</code>) or relative * nanoseconds-from-now (<code>false</code>) * @param time the (absolute millis or relative nanos) time value */ public void park(boolean absolute, long time) { if (absolute) { Thread.currentThread().parkUntil(time); } else { Thread.currentThread().parkFor(time); } }
/** * Parks the calling thread for the specified amount of time, * unless the "permit" for the thread is already available (due to * a previous call to {@link #unpark}. This method may also return * spuriously (that is, without the thread being told to unpark * and without the indicated amount of time elapsing). * * <p>See {@link java.util.concurrent.locks.LockSupport} for more * in-depth information of the behavior of this method.</p> * * @param absolute whether the given time value is absolute * milliseconds-since-the-epoch (<code>true</code>) or relative * nanoseconds-from-now (<code>false</code>) * @param time the (absolute millis or relative nanos) time value */ public void park(boolean absolute, long time) { if (absolute) { Thread.currentThread().parkUntil(time); } else { Thread.currentThread().parkFor(time); } }
/** * Parks the calling thread for the specified amount of time, * unless the "permit" for the thread is already available (due to * a previous call to {@link #unpark}. This method may also return * spuriously (that is, without the thread being told to unpark * and without the indicated amount of time elapsing). * * <p>See {@link java.util.concurrent.locks.LockSupport} for more * in-depth information of the behavior of this method.</p> * * @param absolute whether the given time value is absolute * milliseconds-since-the-epoch (<code>true</code>) or relative * nanoseconds-from-now (<code>false</code>) * @param time the (absolute millis or relative nanos) time value */ public void park(boolean absolute, long time) { if (absolute) { Thread.currentThread().parkUntil(time); } else { Thread.currentThread().parkFor(time); } }