diff options
author | Justin Clark-Casey (justincc) | 2012-03-02 00:28:37 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-03-02 00:28:37 +0000 |
commit | d8c4985527f1ffdea0f21714808522a350d85013 (patch) | |
tree | def4ff4a9ce7675cf93a5f0da172857c30ee0298 /OpenSim/Region/ScriptEngine/Shared/Api | |
parent | lock SenseRepeatListLock when added a new sensor during script reconstitution. (diff) | |
download | opensim-SC-d8c4985527f1ffdea0f21714808522a350d85013.zip opensim-SC-d8c4985527f1ffdea0f21714808522a350d85013.tar.gz opensim-SC-d8c4985527f1ffdea0f21714808522a350d85013.tar.bz2 opensim-SC-d8c4985527f1ffdea0f21714808522a350d85013.tar.xz |
Move SenseRepeaters.Count check inside the SenseRepeatListLock.
No methods in the List class are thread safe in the MS specification/documentation
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index 8383c7f..fbb7c39 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -157,12 +157,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
157 | 157 | ||
158 | public void CheckSenseRepeaterEvents() | 158 | public void CheckSenseRepeaterEvents() |
159 | { | 159 | { |
160 | // Nothing to do here? | ||
161 | if (SenseRepeaters.Count == 0) | ||
162 | return; | ||
163 | |||
164 | lock (SenseRepeatListLock) | 160 | lock (SenseRepeatListLock) |
165 | { | 161 | { |
162 | // Nothing to do here? | ||
163 | if (SenseRepeaters.Count == 0) | ||
164 | return; | ||
165 | |||
166 | // Go through all timers | 166 | // Go through all timers |
167 | foreach (SenseRepeatClass ts in SenseRepeaters) | 167 | foreach (SenseRepeatClass ts in SenseRepeaters) |
168 | { | 168 | { |