Kill some locks that have crept into SOG

avinationmerge
Tom Grimshaw 2010-05-12 08:34:47 -07:00
parent 7705012ee7
commit fd37a21b59
1 changed files with 12 additions and 2 deletions

View File

@ -3651,7 +3651,8 @@ namespace OpenSim.Region.Framework.Scenes
if (atRotTargets.Count > 0)
{
uint[] localids = new uint[0];
lock (m_parts)
lockPartsForRead(true);
try
{
localids = new uint[m_parts.Count];
int cntr = 0;
@ -3661,6 +3662,10 @@ namespace OpenSim.Region.Framework.Scenes
cntr++;
}
}
finally
{
lockPartsForRead(false);
}
for (int ctr = 0; ctr < localids.Length; ctr++)
{
@ -3679,7 +3684,8 @@ namespace OpenSim.Region.Framework.Scenes
{
//trigger not_at_target
uint[] localids = new uint[0];
lock (m_parts)
lockPartsForRead(true);
try
{
localids = new uint[m_parts.Count];
int cntr = 0;
@ -3689,6 +3695,10 @@ namespace OpenSim.Region.Framework.Scenes
cntr++;
}
}
finally
{
lockPartsForRead(false);
}
for (int ctr = 0; ctr < localids.Length; ctr++)
{