synchronized (this[.classinfo]) in druntime and phobos
Alex Rønne Petersen
alex at lycus.org
Mon May 28 16:55:04 PDT 2012
On 29-05-2012 01:46, Jonathan M Davis wrote:
> On Tuesday, May 29, 2012 01:38:25 Alex Rønne Petersen wrote:
>> I should probably add that Java learned it long ago, and yet we adopted
>> it anyway... blergh.
>
> The "lesson learned" from Java that TDPL enumerates is the mistake of having
> synchronized on functions rather than entire classes, but clearly even that is
> currently TDPL-only and not actually properly implemented yet.
>
> - Jonathan M Davis
But synchronized on entire classes is exactly equally flawed... the
fundamental problem is still that they synchronize on a public resource.
--
Alex Rønne Petersen
alex at lycus.org
http://lycus.org
More information about the Digitalmars-d
mailing list