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
lockwhile waiting.Precondition
lockis locked.Postcondition
lockis locked.Declaration
Swift
func wait(_ lock: Mutex) -
Wake up one waiter.
Precondition
thelockassociated withselfis locked.Declaration
Swift
func signal() -
Wake up all waiters.
Precondition
thelockassociated withselfis locked.Declaration
Swift
func broadcast()
View on GitHub
ConditionVariableProtocol Protocol Reference