Extend default 1 second wait for event completion to other thread script reset (as called by llResetOtherScript()).

As with script stop (via llDie()) aborting other scripts event threads, llResetOtherScript() can also abort any current event thread on another script.
On mono 2.6, 2.10 and possibly later this may cause locking problems in certain code areas.
This commit reuses the recently introduced [XEngine] WaitForEventCompletionOnScriptStop to make this a 1 sec timeout, rather than 0 secs.
This commit is contained in:
Justin Clark-Casey (justincc)
2012-12-17 21:37:02 +00:00
parent 021623a17d
commit e6fd8365af
3 changed files with 33 additions and 4 deletions

View File

@@ -877,7 +877,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
return (DateTime.Now - m_EventStart).Seconds;
}
public void ResetScript()
public void ResetScript(int timeout)
{
if (m_Script == null)
return;
@@ -887,7 +887,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
RemoveState();
ReleaseControls();
Stop(0);
Stop(timeout);
SceneObjectPart part = Engine.World.GetSceneObjectPart(LocalID);
part.Inventory.GetInventoryItem(ItemID).PermsMask = 0;
part.Inventory.GetInventoryItem(ItemID).PermsGranter = UUID.Zero;