All right, all right! Interim decision regarding qualified Object methods

RivenTheMage riven-mage at id.ru
Thu Jul 12 06:37:56 PDT 2012


On Thursday, 12 July 2012 at 12:43:01 UTC, Roman D. Boiko wrote:
> On Thursday, 12 July 2012 at 12:36:18 UTC, RivenTheMage wrote:
>>>
>>>The fact that every object has a monitor associated with it 
>>>was a
>>>mistake in Java, and was unfortunately copied in .NET. This 
>>>promotes the bad practice of locking on "this" and on types - 
>>>both of which are typically publicly accessible references. I 
>>>believe that unless a reference is exposed explicitly for the 
>>>purpose of locking (like ICollection.SyncRoot) then you should 
>>>avoid locking on any reference which other code knows about.
>>
>> This has been discussed multiple times on the D forum, I 
>> believe.
>
> Do you mean Monitor or all other issues from that post as well?

Monitor issue.

Here, for example:
http://forum.dlang.org/thread/jq0uku$18v2$1@digitalmars.com



More information about the Digitalmars-d mailing list