Skip to content

Commit

Permalink
Change name: PriorityQueue -> ConcurrentPriorityQueue
Browse files Browse the repository at this point in the history
  • Loading branch information
ZjzMisaka committed Mar 12, 2024
1 parent 368dfd8 commit bb220fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

namespace PowerThreadPool.Collections
{
public class PriorityQueue<T>
public class ConcurrentPriorityQueue<T>
{
private ConcurrentDictionary<int, ConcurrentQueue<T>> queueDic;
private ConcurrentSet<int> prioritySet;
private List<int> reversed;
private int updated;

public PriorityQueue()
public ConcurrentPriorityQueue()
{
queueDic = new ConcurrentDictionary<int, ConcurrentQueue<T>>();
prioritySet = new ConcurrentSet<int>();
Expand Down
2 changes: 1 addition & 1 deletion PowerThreadPool/Worker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class Worker
internal int workerState = WorkerStates.Idle;
internal int gettedLock = WorkerGettedFlags.Unlocked;

private PriorityQueue<string> waitingWorkIDQueue = new PriorityQueue<string>();
private ConcurrentPriorityQueue<string> waitingWorkIDQueue = new ConcurrentPriorityQueue<string>();
private ConcurrentDictionary<string, WorkBase> waitingWorkDic = new ConcurrentDictionary<string, WorkBase>();

private System.Timers.Timer timeoutTimer;
Expand Down

0 comments on commit bb220fe

Please sign in to comment.