Fixed unit tests due to changes in the threadpool
parent
e131e73652
commit
4289b71141
|
@ -2081,6 +2081,9 @@ namespace OpenSim.Framework
|
|||
try
|
||||
{
|
||||
long numRunning = numRunningThreadFuncs;
|
||||
|
||||
if (m_ThreadPool != null)
|
||||
{
|
||||
if ((threadFuncOverloadMode == 0) && (numRunning >= m_ThreadPool.MaxThreads))
|
||||
{
|
||||
if (Interlocked.CompareExchange(ref threadFuncOverloadMode, 1, 0) == 0)
|
||||
|
@ -2091,6 +2094,7 @@ namespace OpenSim.Framework
|
|||
if (Interlocked.CompareExchange(ref threadFuncOverloadMode, 0, 1) == 1)
|
||||
m_log.DebugFormat("Threadfunc: disable overload mode (Queued {0}, Running {1})", numQueued, numRunning);
|
||||
}
|
||||
}
|
||||
|
||||
if (loggingEnabled || (threadFuncOverloadMode == 1))
|
||||
{
|
||||
|
@ -2325,6 +2329,13 @@ namespace OpenSim.Framework
|
|||
/// </summary>
|
||||
public static void RunThreadNoTimeout(WaitCallback callback, string name, object obj)
|
||||
{
|
||||
if (FireAndForgetMethod == FireAndForgetMethod.RegressionTest)
|
||||
{
|
||||
Culture.SetCurrentCulture();
|
||||
callback(obj);
|
||||
return;
|
||||
}
|
||||
|
||||
Thread t = new Thread(delegate()
|
||||
{
|
||||
try
|
||||
|
|
Loading…
Reference in New Issue