Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

Lock.d

Go to the documentation of this file.
00001 
00017 module mango.locks.Lock;
00018 
00019 import mango.locks.Condition;
00020 import mango.locks.TimeUnit;
00021 
00109 interface Lock {
00110 
00117   void lock();
00118 
00144   bool tryLock();
00145 
00169   bool tryLock(long time, TimeUnit unit);
00170 
00174   void unlock();
00175 
00187   Condition newCondition();
00188 }
00189 
00204 auto final class ScopedLock {
00205   this(Lock lock) { this.lock = lock; lock.lock(); }
00206   ~this() {lock.unlock();}
00207   private Lock lock;
00208 }

Generated on Mon Nov 14 10:59:39 2005 for Mango by  doxygen 1.4.0