synchronized (this[.classinfo]) in druntime and phobos
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Wed May 30 12:05:26 PDT 2012
On 5/30/12 11:38 AM, Alex Rønne Petersen wrote:
> On 30-05-2012 20:25, Andrei Alexandrescu wrote:
>> To summarize, the synchronized(obj) operation is not exposing the mutex,
>> only manipulate it in a specific way.
>
> It clearly exposes it *enough* to cause potential for deadlocks by
> manipulating it in this specific way, which is what this is all about.
Nobody claimed synchronized protects against deadlocks. Unfortunately,
raw mutexes are just as bad in that regard.
> I don't think arguing about what "exposed" means in this specific
> context (or perhaps in general?) or what levels of manipulation justify
> the use of the term "expose" will get the discussion anywhere...
I simply pointed out a factual mistake in your argument.
Andrei
More information about the Digitalmars-d
mailing list