AbstractQueuedSynchronizer.getFirstQueuedThread

Returns the first (longest-waiting) thread in the queue, or {@code null} if no threads are currently queued.

<p>In this implementation, this operation normally returns in constant time, but may iterate upon contention if other threads are concurrently modifying the queue.

@return the first (longest-waiting) thread in the queue, or {@code null} if no threads are currently queued

class AbstractQueuedSynchronizer
final
Thread
getFirstQueuedThread
()

Meta