diff options
author | John Hurliman | 2009-10-23 01:02:36 -0700 |
---|---|---|
committer | John Hurliman | 2009-10-23 01:02:36 -0700 |
commit | 588361e2a2398b963871762c2b5485c6a086cf47 (patch) | |
tree | 5be2c6705096817c599075da4e12a0e9b0a4c841 /OpenSim/Region/CoreModules/World/Estate | |
parent | Added VS2010 support to Prebuild and created runprebuild2010.bat (diff) | |
download | opensim-SC-588361e2a2398b963871762c2b5485c6a086cf47.zip opensim-SC-588361e2a2398b963871762c2b5485c6a086cf47.tar.gz opensim-SC-588361e2a2398b963871762c2b5485c6a086cf47.tar.bz2 opensim-SC-588361e2a2398b963871762c2b5485c6a086cf47.tar.xz |
Experimental change to use an immutable array for iterating ScenePresences, avoiding locking and copying the list each time it is accessed
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Estate')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 3bb162e..e3a395e 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -414,9 +414,12 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
414 | private void handleEstateTeleportAllUsersHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID) | 414 | private void handleEstateTeleportAllUsersHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID) |
415 | { | 415 | { |
416 | // Get a fresh list that will not change as people get teleported away | 416 | // Get a fresh list that will not change as people get teleported away |
417 | List<ScenePresence> prescences = m_scene.GetScenePresences(); | 417 | ScenePresence[] presences = m_scene.GetScenePresences(); |
418 | foreach (ScenePresence p in prescences) | 418 | |
419 | for (int i = 0; i < presences.Length; i++) | ||
419 | { | 420 | { |
421 | ScenePresence p = presences[i]; | ||
422 | |||
420 | if (p.UUID != senderID) | 423 | if (p.UUID != senderID) |
421 | { | 424 | { |
422 | // make sure they are still there, we could be working down a long list | 425 | // make sure they are still there, we could be working down a long list |