| Constructor and Description |
|---|
Condition()
Construct condition with internal mutex.
|
Condition(Mutex mutex)
Construct condition with specific mutex.
|
| Modifier and Type | Method and Description |
|---|---|
void |
conditionNotify()
Notify condition has been met.
|
void |
conditionNotifyAll()
Notify all threads that condition has been met.
|
void |
conditionWait()
Wait until condition has been met.
|
void |
lock()
Lock the Condition.
|
String |
toString() |
boolean |
trylock()
Try to lock the Condition.
|
void |
unlock()
Unlock the Condition.
|
public Condition(Mutex mutex)
mutex - the mutexpublic Condition()
public void conditionWait()
throws InterruptedException
InterruptedExceptionpublic void conditionNotify()
public void conditionNotifyAll()
public void lock()
throws InterruptedException
InterruptedExceptionpublic boolean trylock()
throws InterruptedException
true if successfulInterruptedExceptionpublic void unlock()
Copyright © 2014–2016 Tomas Teubner. All rights reserved.