Lines Matching defs:thread

65  * is released either the longest-waiting single writer thread will
70 * <p>A thread that tries to acquire a fair read lock (non-reentrantly)
72 * writer thread. The thread will not acquire the read lock until
73 * after the oldest currently waiting writer thread has acquired and
79 * <p>A thread that tries to acquire a fair write lock (non-reentrantly)
93 * thread have been released.
150 * // Recheck state because another thread might have
276 * A counter for per-thread read hold counts.
297 * The number of reentrant read locks held by current thread.
299 * Removed whenever a thread's read hold count drops to 0.
304 * The hold count of the last thread to successfully acquire
306 * where the next thread to release is the last one to
320 * firstReader is the first thread to have acquired the read lock.
323 * <p>More precisely, firstReader is the unique thread that last
325 * read lock since then; null if there is no such thread.
327 * <p>Cannot cause garbage retention unless the thread terminated
352 * Returns true if the current thread, when trying to acquire
359 * Returns true if the current thread, when trying to acquire
387 * and owner is a different thread, fail.
390 * 3. Otherwise, this thread is eligible for lock if
448 "attempt to unlock read lock, not locked by current thread");
454 * 1. If write lock held by another thread, fail.
455 * 2. Otherwise, this thread is eligible for
463 * 3. If step 2 fails either because thread
610 // we don't need to do so to check if current thread is owner
680 * block if the thread that momentarily appears to be head
724 * another thread and returns immediately.
726 * <p>If the write lock is held by another thread then
727 * the current thread becomes disabled for thread scheduling
735 * Acquires the read lock unless the current thread is
739 * by another thread and returns immediately.
741 * <p>If the write lock is held by another thread then the
742 * current thread becomes disabled for thread scheduling
747 * <li>The read lock is acquired by the current thread; or
749 * <li>Some other thread {@linkplain Thread#interrupt interrupts}
750 * the current thread.
754 * <p>If the current thread:
766 * thread's interrupted status is cleared.
773 * @throws InterruptedException if the current thread is interrupted
781 * another thread at the time of invocation.
784 * another thread and returns immediately with the value
796 * <p>If the write lock is held by another thread then
808 * another thread within the given waiting time and the
809 * current thread has not been {@linkplain Thread#interrupt
813 * another thread and returns immediately with the value
825 * <p>If the write lock is held by another thread then the
826 * current thread becomes disabled for thread scheduling
831 * <li>The read lock is acquired by the current thread; or
833 * <li>Some other thread {@linkplain Thread#interrupt interrupts}
834 * the current thread; or
843 * <p>If the current thread:
853 * current thread's interrupted status is cleared.
867 * @throws InterruptedException if the current thread is interrupted
931 * are held by another thread
935 * <p>If the current thread already holds the write lock then the
939 * <p>If the lock is held by another thread then the current
940 * thread becomes disabled for thread scheduling purposes and
949 * Acquires the write lock unless the current thread is
953 * are held by another thread
957 * <p>If the current thread already holds this lock then the
961 * <p>If the lock is held by another thread then the current
962 * thread becomes disabled for thread scheduling purposes and
967 * <li>The write lock is acquired by the current thread; or
969 * <li>Some other thread {@linkplain Thread#interrupt interrupts}
970 * the current thread.
974 * <p>If the write lock is acquired by the current thread then the
977 * <p>If the current thread:
990 * thread's interrupted status is cleared.
997 * @throws InterruptedException if the current thread is interrupted
1004 * Acquires the write lock only if it is not held by another thread
1008 * are held by another thread
1021 * <p> If the current thread already holds this lock then the
1025 * <p>If the lock is held by another thread then this method
1029 * by the current thread, or the write lock was already held
1030 * by the current thread; and {@code false} otherwise.
1037 * Acquires the write lock if it is not held by another thread
1038 * within the given waiting time and the current thread has
1042 * are held by another thread
1055 * <p>If the current thread already holds this lock then the
1059 * <p>If the lock is held by another thread then the current
1060 * thread becomes disabled for thread scheduling purposes and
1065 * <li>The write lock is acquired by the current thread; or
1067 * <li>Some other thread {@linkplain Thread#interrupt interrupts}
1068 * the current thread; or
1077 * <p>If the current thread:
1090 * thread's interrupted status is cleared.
1105 * by the current thread, or the write lock was already held by the
1106 * current thread; and {@code false} if the waiting time
1109 * @throws InterruptedException if the current thread is interrupted
1121 * <p>If the current thread is the holder of this lock then
1123 * zero then the lock is released. If the current thread is
1127 * @throws IllegalMonitorStateException if the current thread does not
1150 * invoke a condition waiting method when the current thread
1160 * <li>If a thread is {@linkplain Thread#interrupt interrupted} while
1162 * InterruptedException} will be thrown, and the thread's
1185 * followed by the {@linkplain Thread#getName name} of the owning thread.
1193 "[Locked by thread " + o.getName() + "]");
1197 * Queries if this write lock is held by the current thread.
1201 * @return {@code true} if the current thread holds this lock and
1211 * thread. A thread has a hold on a lock for each lock action
1215 * @return the number of holds on this lock by the current thread,
1216 * or zero if this lock is not held by the current thread
1236 * Returns the thread that currently owns the write lock, or
1238 * thread that is not the owner, the return value reflects a
1263 * Queries if the write lock is held by any thread. This method is
1267 * @return {@code true} if any thread holds the write lock and
1275 * Queries if the write lock is held by the current thread.
1277 * @return {@code true} if the current thread holds the write lock and
1286 * current thread. A writer thread has a hold on a lock for
1289 * @return the number of holds on the write lock by the current thread,
1290 * or zero if the write lock is not held by the current thread
1298 * current thread. A reader thread has a hold on a lock for
1301 * @return the number of holds on the read lock by the current thread,
1302 * or zero if the read lock is not held by the current thread
1343 * thread will ever acquire a lock. This method is designed
1354 * Queries whether the given thread is waiting to acquire either
1357 * that this thread will ever acquire a lock. This method is
1360 * @param thread the thread
1361 * @return {@code true} if the given thread is queued waiting for this lock
1362 * @throws NullPointerException if the thread is null
1364 public final boolean hasQueuedThread(Thread thread) {
1365 return sync.isQueued(thread);