Don't bother taking OdeLock during OdeScene construction, since there can be no contention until the object is constructed.

0.7.2-post-fixes
Justin Clark-Casey (justincc) 2011-10-18 21:03:41 +01:00
parent d6456b9ea8
commit 1a008b237b
1 changed files with 13 additions and 16 deletions

View File

@ -279,7 +279,7 @@ namespace OpenSim.Region.Physics.OdePlugin
/// <summary>
/// Used to lock the entire physics scene. Locked during the main part of Simulate()
/// </summary>
public Object OdeLock;
internal Object OdeLock = new Object();
public IMesher mesher;
@ -315,27 +315,24 @@ namespace OpenSim.Region.Physics.OdePlugin
m_log
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType.ToString() + "." + sceneIdentifier);
OdeLock = new Object();
nearCallback = near;
triCallback = TriCallback;
triArrayCallback = TriArrayCallback;
m_rayCastManager = new ODERayCastRequestManager(this);
lock (OdeLock)
{
// Create the world and the first space
world = d.WorldCreate();
space = d.HashSpaceCreate(IntPtr.Zero);
contactgroup = d.JointGroupCreate(0);
//contactgroup
// Create the world and the first space
world = d.WorldCreate();
space = d.HashSpaceCreate(IntPtr.Zero);
d.WorldSetAutoDisableFlag(world, false);
#if USE_DRAWSTUFF
Thread viewthread = new Thread(new ParameterizedThreadStart(startvisualization));
viewthread.Start();
#endif
}
contactgroup = d.JointGroupCreate(0);
//contactgroup
d.WorldSetAutoDisableFlag(world, false);
#if USE_DRAWSTUFF
Thread viewthread = new Thread(new ParameterizedThreadStart(startvisualization));
viewthread.Start();
#endif
_watermap = new float[258 * 258];