The returned {@link Condition} instance supports the sameusages as do the {@link Object} monitor methods ({@link Object#wait() wait}, {@link Object#notify notify}, and {@link Object#notifyAll notifyAll}) when used with the built-in monitor lock.
Before waiting on the condition the lock must be held by the current thread. A call to {@link Condition#await()} will atomically release the lockbefore waiting and re-acquire the lock before the wait returns.
Implementation Considerations
The exact operation of the {@link Condition} instance depends onthe {@code Lock} implementation and must be documented by thatimplementation. @return A new {@link Condition} instance for this {@code Lock} instance @throws UnsupportedOperationException if this {@code Lock}implementation does not support conditions
The returned {@link Condition} instance supports the sameusages as do the {@link Object} monitor methods ({@link Object#wait() wait}, {@link Object#notify notify}, and {@link Object#notifyAll notifyAll}) when used with the built-in monitor lock.
|
|
|
|
|
|