ConditionObject

Condition implementation for a AbstractQueuedSynchronizer serving as the basis of a Lock implementation.

Method documentation for this class describes mechanics, not behavioral specifications from the point of view of Lock and Condition users. Exported versions of this class will in general need to be accompanied by documentation describing condition semantics that rely on those of the associated AbstractQueuedSynchronizer.

This class is Serializable, but all fields are transient, so deserialized conditions have no waiters.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open suspend override fun await()

Implements interruptible condition wait.

open suspend override fun await(time: Long, unit: TimeUnit): Boolean

Implements timed condition wait.

Link copied to clipboard
open suspend override fun awaitNanos(nanosTimeout: Long): Long

Implements timed condition wait.

Link copied to clipboard
open suspend override fun awaitUninterruptibly()

Implements uninterruptible condition wait.

Link copied to clipboard
open suspend override fun awaitUntil(deadline: Instant): Boolean

Implements absolute timed condition wait.

Link copied to clipboard

Queries whether any threads are waiting on this condition. Implements AbstractQueuedSynchronizer.hasWaiters.

Link copied to clipboard

Returns true if this condition was created by the given synchronization object.

Link copied to clipboard
open suspend override fun signal()

Moves the longest-waiting thread, if one exists, from the wait queue for this condition to the wait queue for the owning lock.

Link copied to clipboard
open suspend override fun signalAll()

Moves all threads from the wait queue for this condition to the wait queue for the owning lock.