diff options
author | UbitUmarov | 2018-10-21 12:13:21 +0100 |
---|---|---|
committer | UbitUmarov | 2018-10-21 12:13:21 +0100 |
commit | 09865557650b4d1b36d8ebf292191d0feb1445fa (patch) | |
tree | ad74f8e0ab3bb3e4ba14fbc6dd1fb68ca84f1dac /OpenSim/Region/PhysicsModules/BulletS/BSScene.cs | |
parent | Add non-transparent water asset (diff) | |
download | opensim-SC-09865557650b4d1b36d8ebf292191d0feb1445fa.zip opensim-SC-09865557650b4d1b36d8ebf292191d0feb1445fa.tar.gz opensim-SC-09865557650b4d1b36d8ebf292191d0feb1445fa.tar.bz2 opensim-SC-09865557650b4d1b36d8ebf292191d0feb1445fa.tar.xz |
mantis 8387: (try) avoid potencial out of order phys operations
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/PhysicsModules/BulletS/BSScene.cs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs index 163efaa..8e29dd0 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs | |||
@@ -352,13 +352,9 @@ namespace OpenSim.Region.PhysicsModule.BulletS | |||
352 | if (BSParam.UseSeparatePhysicsThread) | 352 | if (BSParam.UseSeparatePhysicsThread) |
353 | { | 353 | { |
354 | // The physics simulation should happen independently of the heartbeat loop | 354 | // The physics simulation should happen independently of the heartbeat loop |
355 | m_physicsThread | 355 | m_physicsThread = WorkManager.StartThread( |
356 | = WorkManager.StartThread( | ||
357 | BulletSPluginPhysicsThread, | 356 | BulletSPluginPhysicsThread, |
358 | string.Format("{0} ({1})", BulletEngineName, RegionName), | 357 | string.Format("{0} ({1})", BulletEngineName, RegionName)); |
359 | ThreadPriority.Normal, | ||
360 | true, | ||
361 | true); | ||
362 | } | 358 | } |
363 | } | 359 | } |
364 | 360 | ||
@@ -1238,6 +1234,8 @@ namespace OpenSim.Region.PhysicsModule.BulletS | |||
1238 | { | 1234 | { |
1239 | if (!m_initialized) return; | 1235 | if (!m_initialized) return; |
1240 | 1236 | ||
1237 | /* mantis 8397 ??? avoid out of order operations ??? | ||
1238 | |||
1241 | if (Monitor.TryEnter(PhysicsEngineLock)) | 1239 | if (Monitor.TryEnter(PhysicsEngineLock)) |
1242 | { | 1240 | { |
1243 | // If we can get exclusive access to the physics engine, just do the operation | 1241 | // If we can get exclusive access to the physics engine, just do the operation |
@@ -1246,12 +1244,13 @@ namespace OpenSim.Region.PhysicsModule.BulletS | |||
1246 | } | 1244 | } |
1247 | else | 1245 | else |
1248 | { | 1246 | { |
1247 | */ | ||
1249 | // The physics engine is busy, queue the operation | 1248 | // The physics engine is busy, queue the operation |
1250 | lock (_taintLock) | 1249 | lock (_taintLock) |
1251 | { | 1250 | { |
1252 | _taintOperations.Add(new TaintCallbackEntry(pOriginator, pIdent, pCallback)); | 1251 | _taintOperations.Add(new TaintCallbackEntry(pOriginator, pIdent, pCallback)); |
1253 | } | 1252 | } |
1254 | } | 1253 | // } |
1255 | } | 1254 | } |
1256 | 1255 | ||
1257 | private void TriggerPreStepEvent(float timeStep) | 1256 | private void TriggerPreStepEvent(float timeStep) |