ConditionVariableProtocol
public protocol ConditionVariableProtocol
A condition variable.
Only perform operations on self
when holding the mutex associated with self
.
-
The mutex type associated with this condition variable.
Declaration
Swift
associatedtype Mutex : MutexProtocol
-
Initializes
self
.Declaration
Swift
init()
-
Wait until signaled, releasing
lock
while waiting.Precondition
lock
is locked.Postcondition
lock
is locked.Declaration
Swift
func wait(_ lock: Mutex)
-
Wake up one waiter.
Precondition
thelock
associated withself
is locked.Declaration
Swift
func signal()
-
Wake up all waiters.
Precondition
thelock
associated withself
is locked.Declaration
Swift
func broadcast()