[Opensim-dev] .NET / Mono lock(obj) statement

Justin Clark-Casey jjustincc at googlemail.com
Wed Jan 14 17:25:22 UTC 2009


Diva Canto wrote:
>> Homer Horwitz wrote:
>>   
>>> I just tried that with Mono 2.0.1, and it works correctly (i.e. it
>>> doesn't deadlock). I used an instance variable object a = new object()
>>> for the lock.
> I'm going to try to produce a simple test case. I too would be surprised 
> if mono would deadlock on the simple single-thread double-locking 
> situation; I suspect the delegate and/or the fact that the object is 
> being accessed via an alias in one of the locks may be the issue. (I am 
> using mono 2.0.1) That whole part of accessing the ScenePresences field 
> (of SceneGraph) is very dubious -- that field is being "leaked" to 
> Scene, and it really shouldn't.
> 

I agree, there's some fairly horrible sharing of internals down there.

> 
> Justin Clark-Casey wrote:
>> I don't think that we can remove locking long term as done in r8041.  
> Locking was not removed, and I'm happy about that. Turns out that one of 
> the locks (the first) was an overkill at best. I corrected it to lock 
> only for the required purpose of grabbing the scene presence from the 
> scene presences dictionary.

Oops sorry, my mistake.  My diff reading skills failed me.

-- 
justincc
Justin Clark-Casey
http://justincc.wordpress.com



More information about the Opensim-dev mailing list