mantis 8387: (try) avoid potencial out of order phys operations
parent
94a5e5b9b7
commit
0986555765
|
@ -352,13 +352,9 @@ namespace OpenSim.Region.PhysicsModule.BulletS
|
||||||
if (BSParam.UseSeparatePhysicsThread)
|
if (BSParam.UseSeparatePhysicsThread)
|
||||||
{
|
{
|
||||||
// The physics simulation should happen independently of the heartbeat loop
|
// The physics simulation should happen independently of the heartbeat loop
|
||||||
m_physicsThread
|
m_physicsThread = WorkManager.StartThread(
|
||||||
= WorkManager.StartThread(
|
|
||||||
BulletSPluginPhysicsThread,
|
BulletSPluginPhysicsThread,
|
||||||
string.Format("{0} ({1})", BulletEngineName, RegionName),
|
string.Format("{0} ({1})", BulletEngineName, RegionName));
|
||||||
ThreadPriority.Normal,
|
|
||||||
true,
|
|
||||||
true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1238,6 +1234,8 @@ namespace OpenSim.Region.PhysicsModule.BulletS
|
||||||
{
|
{
|
||||||
if (!m_initialized) return;
|
if (!m_initialized) return;
|
||||||
|
|
||||||
|
/* mantis 8397 ??? avoid out of order operations ???
|
||||||
|
|
||||||
if (Monitor.TryEnter(PhysicsEngineLock))
|
if (Monitor.TryEnter(PhysicsEngineLock))
|
||||||
{
|
{
|
||||||
// If we can get exclusive access to the physics engine, just do the operation
|
// If we can get exclusive access to the physics engine, just do the operation
|
||||||
|
@ -1246,12 +1244,13 @@ namespace OpenSim.Region.PhysicsModule.BulletS
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
*/
|
||||||
// The physics engine is busy, queue the operation
|
// The physics engine is busy, queue the operation
|
||||||
lock (_taintLock)
|
lock (_taintLock)
|
||||||
{
|
{
|
||||||
_taintOperations.Add(new TaintCallbackEntry(pOriginator, pIdent, pCallback));
|
_taintOperations.Add(new TaintCallbackEntry(pOriginator, pIdent, pCallback));
|
||||||
}
|
}
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TriggerPreStepEvent(float timeStep)
|
private void TriggerPreStepEvent(float timeStep)
|
||||||
|
|
Loading…
Reference in New Issue