mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 20:05:33 +08:00
smartthreadpool: place a global throttle on threads creation if pool as less than min number of threads ( 20/s versus .net 1/s in all cases)
This commit is contained in:
5
ThirdParty/SmartThreadPool/WorkItem.cs
vendored
5
ThirdParty/SmartThreadPool/WorkItem.cs
vendored
@@ -292,14 +292,13 @@ namespace Amib.Threading.Internal
|
||||
{
|
||||
if (IsCanceled)
|
||||
{
|
||||
bool result = false;
|
||||
if ((_workItemInfo.PostExecuteWorkItemCallback != null) &&
|
||||
((_workItemInfo.CallToPostExecute & CallToPostExecute.WhenWorkItemCanceled) == CallToPostExecute.WhenWorkItemCanceled))
|
||||
{
|
||||
result = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
return result;
|
||||
return false;
|
||||
}
|
||||
|
||||
Debug.Assert(WorkItemState.InQueue == GetWorkItemState());
|
||||
|
||||
Reference in New Issue
Block a user