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

Alan M Webb alan_webb at us.ibm.com
Wed Jan 14 11:52:28 UTC 2009


Does someone have an actual test case (as simple as the one shown here) 
that DOES exhibit the problem? And can they say what version of mono, what 
OS (distro, version, and kernel release), and which processor (and how 
many?).

Best regards
Alan
-------------------
T.J. Watson Research Center, Hawthorne, NY
1-914-784-7286
alan_webb at us.ibm.com



From:
Diva Canto <diva at metaverseink.com>
To:
opensim-dev at lists.berlios.de
Date:
01/13/2009 11:58 PM
Subject:
[Opensim-dev] .NET / Mono lock(obj) statement



Hi everyone,

Just got back from vacation to TP grief caused by extra locking 
introduced in 7982. The extra locking is all good, but it seems that 
certain things confuse the heck out of mono, so I thought I'd bring up 
the issue here -- I'm pretty sure this problem occurs in other places of 
the code too, so it's good to know what to expect. I'd certainly like to 
find out more about the .NET spec.

Here's a simplified version of the problem:

lock (a)
{
   foo();
}

void foo()
{
  lock (a)
  {
    ...
  }
}

(the real situation is a bit more complicated; foo() involves a 
delegate; but ignore that)

In Java, this situation does NOT result in locking, because it's the 
same thread that's acquiring object a. I can't find the spec for .NET 
for this particular issue, but I'd be very surprised if it is different 
from Java. Nevertheless, mono was deadlocking here; Windows was not. I 
find the mono behavior very strange.

Crista

_______________________________________________
Opensim-dev mailing list
Opensim-dev at lists.berlios.de
https://lists.berlios.de/mailman/listinfo/opensim-dev


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20090114/fa22699a/attachment-0001.html>


More information about the Opensim-dev mailing list