|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--pnuts.util.Mutex
A simple mutex class
Constructor Summary | |
Mutex()
create mutex object |
|
Mutex(boolean priv)
create mutex object |
Method Summary | |
void |
lock()
Lock it Be careful not to deadlock. |
void |
unlock()
Unlock it |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Mutex()
public Mutex(boolean priv)
priv
- If true a lock belongs to one owner otherwise not.Method Detail |
public void lock() throws java.lang.InterruptedException
public void unlock()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |