All right, all right! Interim decision regarding qualified Object methods
Roman D. Boiko
rb at d-coding.com
Thu Jul 12 06:35:53 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:
>> On Thursday, 12 July 2012 at 12:06:49 UTC, Roman D. Boiko
>> wrote:
>>> Jon Skeet wrote on this long ago:
>>
>> http://msmvps.com/blogs/jon_skeet/archive/2008/12/05/redesigning-system-object-java-lang-object.aspx
>>
>>>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?
> Do you have any links? I would be interested to know
> conclusions.
OK, I found one myself from this post:
http://michelf.com/weblog/2012/mutex-synchonization-in-d/
More information about the Digitalmars-d
mailing list