smartthreadpool: remove workitems priority. Its lack of fairness could cause issues hard to debug if we tried to use it (we don't) (runprebuild)

This commit is contained in:
UbitUmarov
2020-12-31 14:29:36 +00:00
parent b61df051db
commit 4b7502c1dc
13 changed files with 23 additions and 654 deletions

View File

@@ -26,7 +26,7 @@ namespace Amib.Threading.Internal
/// <summary>
/// Work items queue
/// </summary>
private readonly PriorityQueue _workItems = new PriorityQueue();
private readonly Queue<WorkItem> _workItems = new Queue<WorkItem>();
/// <summary>
/// Indicate that work items are allowed to be queued
@@ -166,7 +166,7 @@ namespace Amib.Threading.Internal
// If there are waiting work items then take one and return.
if (_workItems.Count > 0)
{
workItem = _workItems.Dequeue() as WorkItem;
workItem = _workItems.Dequeue();
return workItem;
}
@@ -224,7 +224,7 @@ namespace Amib.Threading.Internal
if (null == workItem)
{
workItem = _workItems.Dequeue() as WorkItem;
workItem = _workItems.Dequeue();
}
}
}