synchronized (this[.classinfo]) in druntime and phobos

Sean Kelly sean at invisibleduck.org
Thu May 31 12:27:31 PDT 2012


On May 31, 2012, at 11:33 AM, Andrei Alexandrescu wrote:
> 
> It does make sense, but I think we need a Lock struct type that makes sure code cannot screw up the number of lock and unlock calls. We shouldn't just expose bare lock() and unlock().

synchronized already works with classes that implement Object.Monitor, and we have scope guards.  Do we really need an RTTI Lock struct as well?


More information about the Digitalmars-d mailing list