wait/notifyAll like in Java

BLS Killing_Zoe at web.de
Sat Mar 3 06:12:34 PST 2007


Subject: Monitor / *Scope(exit)*
Hi Frank,
at least this makes me think :

http://www.digitalmars.com/d/exception-safe.html

and especially :
void abc()
{
     Mutex m = new Mutex;

     lock(m);	// lock the mutex
     *scope(exit) unlock(m);	// unlock on leaving the scope *

     foo();	// do processing
}

Hope this is usefull, Bjoern

Frank Benoit (keinfarbton) schrieb:
>>2) Ben Hinkle has translated this package into D;
> 
> 
> I found this lib, in an old version of mango.
> In mango/locks/LockImpl.d the AbstractLock class implements the
> wait/notify and the queue for waiting threads. That is probably on part
> of what I need.
> 
> The other part is to bring together the D monitor with this lock.
> 
> Thanks for the hint.



More information about the Digitalmars-d mailing list