Prevent a race condition between the script engine backup thread and script removal by locking on the script's EventQueue and only proceeding if it's flagged as still running.

Relates to http://opensimulator.org/mantis/view.php?id=7407
This commit is contained in:
Justin Clark-Casey (justincc)
2015-01-16 23:55:00 +00:00
parent 8d724e90de
commit faaf47a86f
3 changed files with 48 additions and 39 deletions

View File

@@ -178,8 +178,9 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
/// <param name="timeout"></param>
/// How many milliseconds we will wait for an existing script event to finish before
/// forcibly aborting that event.
/// <param name="clearEventQueue">If true then the event queue is also cleared</param>
/// <returns>true if the script was successfully stopped, false otherwise</returns>
bool Stop(int timeout);
bool Stop(int timeout, bool clearEventQueue = false);
void SetState(string state);