All Packages Class Hierarchy This Package Previous Next Index
Class pnuts.util.Mutex
pnuts.util.Mutex
- public class Mutex
A simple mutex class
-
Mutex()
- create mutex object
-
Mutex(boolean)
- create mutex object
-
lock()
- Lock it
Be careful not to deadlock.
-
unlock()
- Unlock it
Mutex
public Mutex()
- create mutex object
Mutex
public Mutex(boolean priv)
- create mutex object
- Parameters:
- priv - If true a lock belongs to one owner otherwise not.
lock
public synchronized void lock() throws InterruptedException
- Lock it
Be careful not to deadlock.
unlock
public synchronized void unlock()
- Unlock it
All Packages Class Hierarchy This Package Previous Next Index