| |
|
| java.lang.Object pnuts.multithread.Mutex
Mutex | public class Mutex (Code) | | A simple mutex class
author: Toyokazu Tomatsu version: 1.1 |
Constructor Summary | |
public | Mutex() | public | Mutex(boolean priv) |
Method Summary | |
public synchronized void | lock() Lock it
Be careful not to deadlock. | public synchronized void | unlock() |
Mutex | public Mutex()(Code) | | create mutex object
|
Mutex | public Mutex(boolean priv)(Code) | | create mutex object
Parameters: priv - If true a lock belongs to one owner otherwise not. |
unlock | public synchronized void unlock()(Code) | | Unlock it
|
|
|
|