simbad.sim
Class Lock

java.lang.Object
  extended bysimbad.sim.Lock

public class Lock
extends java.lang.Object

A Simple lock for mutual exclusion.


Method Summary
 void lock()
          Obtain the lock.
 void unlock()
          Release the lock.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

lock

public void lock()
Obtain the lock. Only one thread at each time.


unlock

public void unlock()
Release the lock.