public class Mutex extends Object
| Constructor and Description |
|---|
Mutex()
Creates a new Mutex instance in the unlocked state.
|
| Modifier and Type | Method and Description |
|---|---|
void |
lock()
Acquires the lock, blocking if necessary until the lock is available.
|
void |
unlock()
Releases the lock and notifies all waiting threads.
|
public void lock()
public void unlock()