shared adventures in the realm of thread-safety.

Michel Fortin michel.fortin at michelf.com
Sun Sep 13 17:08:32 PDT 2009


On 2009-09-13 18:08:57 -0400, Jeremie Pelletier <jeremiep at gmail.com> said:

>>> foo1.foo(); // ok, synchronized call
>>> synchronized(foo1) foo1.foo(); // warning: recursive synchronization
>> 
>> Why a warning? Monitors are designed to handle recursive synchronization.
> 
> Its a performance issue that can easily be avoided, but still generates 
> valid code.

Also, some people consider recursive locks as potential design flaws.
<http://landheer-cieslak.com/wordpress/?p=57>

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/




More information about the Digitalmars-d mailing list