diff options
author | Robert Adams | 2015-08-02 22:31:53 -0700 |
---|---|---|
committer | Robert Adams | 2015-08-02 22:31:53 -0700 |
commit | fdb7a804fcbcddec0e2f2edc15ad1ede1bfee2aa (patch) | |
tree | 11c29fa37155b08858ac991b85d855af32cb6311 /OpenSim/Region/Framework/Scenes/Scene.cs | |
parent | Add HGFSAssetService to the HypergridService to provide HG support for FSAssets. (diff) | |
download | opensim-SC-fdb7a804fcbcddec0e2f2edc15ad1ede1bfee2aa.zip opensim-SC-fdb7a804fcbcddec0e2f2edc15ad1ede1bfee2aa.tar.gz opensim-SC-fdb7a804fcbcddec0e2f2edc15ad1ede1bfee2aa.tar.bz2 opensim-SC-fdb7a804fcbcddec0e2f2edc15ad1ede1bfee2aa.tar.xz |
Add an option to processes physics collisions using FireAndForget.
Off by default but set with [Startup]ShouldUseFireAndForgetForCollsions=true
There is a problem with physics colliions sometimes stopping. One suspicion
is that the long callback path from the physics engine into the script engine
is causing problems. Enabling this feature passes the collision into the
script engine on a separate thread and not the main simulation thread.
Tester can enable this and see if the collsions stay around. If they still
fail, this commit should be reverted and another solution looked for.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rwxr-xr-x | OpenSim/Region/Framework/Scenes/Scene.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index b876fc6..2a69ee1 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -423,6 +423,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
423 | private int landMS; | 423 | private int landMS; |
424 | private int spareMS; | 424 | private int spareMS; |
425 | 425 | ||
426 | // A temporary configuration flag to enable using FireAndForget to process | ||
427 | // collisions from the physics engine. There is a problem with collisions | ||
428 | // stopping sometimes and MB's suspicion is some race condition passing | ||
429 | // collisions from the physics engine callback to the script engine. | ||
430 | // This causes the collision events to be passed with a FireAndForget | ||
431 | // call which should eliminate that linkage. Testers can turn this on | ||
432 | // and see if collisions stop. If they don't, the problem is somewhere else. | ||
433 | // This feature defaults to 'off' so, by default, the simulator operation | ||
434 | // is not changed. | ||
435 | public bool ShouldUseFireAndForgetForCollisions = false; | ||
436 | |||
426 | /// <summary> | 437 | /// <summary> |
427 | /// Tick at which the last frame was processed. | 438 | /// Tick at which the last frame was processed. |
428 | /// </summary> | 439 | /// </summary> |
@@ -1075,8 +1086,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1075 | m_update_presences = startupConfig.GetInt("UpdateAgentsEveryNFrames", m_update_presences); | 1086 | m_update_presences = startupConfig.GetInt("UpdateAgentsEveryNFrames", m_update_presences); |
1076 | m_update_terrain = startupConfig.GetInt("UpdateTerrainEveryNFrames", m_update_terrain); | 1087 | m_update_terrain = startupConfig.GetInt("UpdateTerrainEveryNFrames", m_update_terrain); |
1077 | m_update_temp_cleaning = startupConfig.GetInt("UpdateTempCleaningEveryNSeconds", m_update_temp_cleaning); | 1088 | m_update_temp_cleaning = startupConfig.GetInt("UpdateTempCleaningEveryNSeconds", m_update_temp_cleaning); |
1089 | |||
1090 | if (startupConfig.Contains("ShouldUseFireAndForgetForCollisions")) | ||
1091 | { | ||
1092 | ShouldUseFireAndForgetForCollisions = startupConfig.GetBoolean("ShouldUseFireAndForgetForCollisions", false); | ||
1093 | } | ||
1078 | } | 1094 | } |
1079 | 1095 | ||
1096 | |||
1080 | // FIXME: Ultimately this should be in a module. | 1097 | // FIXME: Ultimately this should be in a module. |
1081 | SendPeriodicAppearanceUpdates = false; | 1098 | SendPeriodicAppearanceUpdates = false; |
1082 | 1099 | ||