All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pnuts.util.Mutex

pnuts.util.Mutex

public class Mutex
A simple mutex class


Constructor Index

 o Mutex()
create mutex object
 o Mutex(boolean)
create mutex object

Method Index

 o lock()
Lock it Be careful not to deadlock.
 o unlock()
Unlock it

Constructors

 o Mutex
 public Mutex()
create mutex object

 o Mutex
 public Mutex(boolean priv)
create mutex object

Parameters:
priv - If true a lock belongs to one owner otherwise not.

Methods

 o lock
 public synchronized void lock() throws InterruptedException
Lock it Be careful not to deadlock.

 o unlock
 public synchronized void unlock()
Unlock it


All Packages  Class Hierarchy  This Package  Previous  Next  Index