mirror of
https://github.com/opensim/opensim.git
synced 2026-06-19 20:05:47 +08:00
cosmetics
This commit is contained in:
16
ThirdParty/SmartThreadPool/SmartThreadPool.cs
vendored
16
ThirdParty/SmartThreadPool/SmartThreadPool.cs
vendored
@@ -826,6 +826,7 @@ namespace Amib.Threading
|
||||
InformCompleted();
|
||||
FireOnThreadTermination();
|
||||
_workItemsQueue.CloseThreadWaiter();
|
||||
CurrentThreadEntry = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -860,19 +861,8 @@ namespace Amib.Threading
|
||||
|
||||
internal static void ValidateWorkItemsGroupWaitForIdle(IWorkItemsGroup workItemsGroup)
|
||||
{
|
||||
if (null == CurrentThreadEntry)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
WorkItem workItem = CurrentThreadEntry.CurrentWorkItem;
|
||||
ValidateWorkItemsGroupWaitForIdleImpl(workItemsGroup, workItem);
|
||||
if ((null != workItemsGroup) &&
|
||||
(null != workItem) &&
|
||||
CurrentThreadEntry.CurrentWorkItem.WasQueuedBy(workItemsGroup))
|
||||
{
|
||||
throw new NotSupportedException("WaitForIdle cannot be called from a thread on its SmartThreadPool, it causes a deadlock");
|
||||
}
|
||||
if (CurrentThreadEntry != null)
|
||||
ValidateWorkItemsGroupWaitForIdleImpl(workItemsGroup, CurrentThreadEntry.CurrentWorkItem);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
|
||||
Reference in New Issue
Block a user