mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Merge branch 'master' into careminster
Conflicts: ThirdParty/SmartThreadPool/SmartThreadPool.cs
This commit is contained in:
@@ -551,7 +551,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||
/// <param name="instance"></param>
|
||||
/// <param name="keySelector">Basis on which to sort output. Can be null if no sort needs to take place</param>
|
||||
private void HandleScriptsAction<TKey>(
|
||||
string[] cmdparams, Action<IScriptInstance> action, Func<IScriptInstance, TKey> keySelector)
|
||||
string[] cmdparams, Action<IScriptInstance> action, System.Func<IScriptInstance, TKey> keySelector)
|
||||
{
|
||||
if (!(MainConsole.Instance.ConsoleScene == null || MainConsole.Instance.ConsoleScene == m_Scene))
|
||||
return;
|
||||
@@ -1599,7 +1599,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||
startInfo.MaxWorkerThreads = maxThreads;
|
||||
startInfo.MinWorkerThreads = minThreads;
|
||||
startInfo.ThreadPriority = threadPriority;;
|
||||
startInfo.StackSize = stackSize;
|
||||
startInfo.MaxStackSize = stackSize;
|
||||
startInfo.StartSuspended = true;
|
||||
|
||||
m_ThreadPool = new SmartThreadPool(startInfo);
|
||||
|
||||
@@ -52,16 +52,16 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||
return wr.Cancel();
|
||||
}
|
||||
|
||||
public void Abort()
|
||||
public bool Abort()
|
||||
{
|
||||
wr.Abort();
|
||||
return wr.Cancel(true);
|
||||
}
|
||||
|
||||
public bool Wait(int t)
|
||||
{
|
||||
// We use the integer version of WaitAll because the current version of SmartThreadPool has a bug with the
|
||||
// TimeSpan version. The number of milliseconds in TimeSpan is an int64 so when STP casts it down to an
|
||||
// int (32-bit) we can end up with bad values. This occurs on Windows though curious not on Mono 2.10.8
|
||||
// int (32-bit) we can end up with bad values. This occurs on Windows though curiously not on Mono 2.10.8
|
||||
// (or very likely other versions of Mono at least up until 3.0.3).
|
||||
return SmartThreadPool.WaitAll(new IWorkItemResult[] {wr}, t, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user