minor locking issue
parent
3abd54082f
commit
d1e3be1efe
|
@ -14674,7 +14674,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
msAvailable -= m_castRayCalls[i].UsedMs;
|
msAvailable -= m_castRayCalls[i].UsedMs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Return failure if not enough available time
|
// Return failure if not enough available time
|
||||||
if (msAvailable < m_msMinInCastRay)
|
if (msAvailable < m_msMinInCastRay)
|
||||||
|
@ -14682,6 +14681,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
result.Add(new LSL_Integer(ScriptBaseClass.RCERR_CAST_TIME_EXCEEDED));
|
result.Add(new LSL_Integer(ScriptBaseClass.RCERR_CAST_TIME_EXCEEDED));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize
|
// Initialize
|
||||||
List<RayHit> rayHits = new List<RayHit>();
|
List<RayHit> rayHits = new List<RayHit>();
|
||||||
|
@ -15068,13 +15068,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
// Add to throttle data
|
// Add to throttle data
|
||||||
stopWatch.Stop();
|
stopWatch.Stop();
|
||||||
|
lock (m_castRayCalls)
|
||||||
|
{
|
||||||
CastRayCall castRayCall = new CastRayCall();
|
CastRayCall castRayCall = new CastRayCall();
|
||||||
castRayCall.RegionId = regionId;
|
castRayCall.RegionId = regionId;
|
||||||
castRayCall.UserId = userId;
|
castRayCall.UserId = userId;
|
||||||
castRayCall.CalledMs = calledMs;
|
castRayCall.CalledMs = calledMs;
|
||||||
castRayCall.UsedMs = (int)stopWatch.ElapsedMilliseconds;
|
castRayCall.UsedMs = (int)stopWatch.ElapsedMilliseconds;
|
||||||
lock (m_castRayCalls)
|
|
||||||
{
|
|
||||||
m_castRayCalls.Add(castRayCall);
|
m_castRayCalls.Add(castRayCall);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue