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

@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Runtime.CompilerServices;
using System.Diagnostics;
@@ -42,7 +43,7 @@ namespace Amib.Threading.Internal
/// Priority queue to hold work items before they are passed
/// to the SmartThreadPool.
/// </summary>
private readonly PriorityQueue _workItemsQueue;
private readonly Queue<WorkItem> _workItemsQueue;
/// <summary>
/// Indicate how many work items are waiting in the SmartThreadPool
@@ -93,7 +94,7 @@ namespace Amib.Threading.Internal
_stp = stp;
_concurrency = concurrency;
_workItemsGroupStartInfo = new WIGStartInfo(wigStartInfo).AsReadOnly();
_workItemsQueue = new PriorityQueue();
_workItemsQueue = new Queue<WorkItem>();
Name = "WorkItemsGroup";
// The _workItemsInStpQueue gets the number of currently executing work items,