diff --git a/PowerThreadPool/Collections/PriorityQueue.cs b/PowerThreadPool/Collections/ConcurrentPriorityQueue.cs similarity index 94% rename from PowerThreadPool/Collections/PriorityQueue.cs rename to PowerThreadPool/Collections/ConcurrentPriorityQueue.cs index 7bb1365..270c106 100644 --- a/PowerThreadPool/Collections/PriorityQueue.cs +++ b/PowerThreadPool/Collections/ConcurrentPriorityQueue.cs @@ -6,14 +6,14 @@ namespace PowerThreadPool.Collections { - public class PriorityQueue + public class ConcurrentPriorityQueue { private ConcurrentDictionary> queueDic; private ConcurrentSet prioritySet; private List reversed; private int updated; - public PriorityQueue() + public ConcurrentPriorityQueue() { queueDic = new ConcurrentDictionary>(); prioritySet = new ConcurrentSet(); diff --git a/PowerThreadPool/Worker.cs b/PowerThreadPool/Worker.cs index 7bb517f..d949982 100644 --- a/PowerThreadPool/Worker.cs +++ b/PowerThreadPool/Worker.cs @@ -20,7 +20,7 @@ public class Worker internal int workerState = WorkerStates.Idle; internal int gettedLock = WorkerGettedFlags.Unlocked; - private PriorityQueue waitingWorkIDQueue = new PriorityQueue(); + private ConcurrentPriorityQueue waitingWorkIDQueue = new ConcurrentPriorityQueue(); private ConcurrentDictionary waitingWorkDic = new ConcurrentDictionary(); private System.Timers.Timer timeoutTimer;