Closed zhuxb711 closed 1 year ago
Hey there, freshman! Wassup?
@noamyogev84 Hope that would help your repo, thanks!
Hey there @zhuxb711 I like your suggestion! Feel free to issue A PR
Would you mind let me help you upgrade the whole repo and libraries to the latest?
Please check #19
Thanks for your great work. But I have some suggestion.
It would be great if we could check if queue.Count > 0 before call queue.Peek() or just use queue.TryPeek(). If queue is empty, then queue.Peek() will threw exception, which will affect the performance deeply. Thanks.
https://github.com/noamyogev84/ConcurrentPriorityQueue/blob/e512c33078d336904aee42e83b45630df3165081/ConcurrentPriorityQueue/Core/ConcurrentPriorityQueue.cs#L103
Solution 1:
Solution 2:
Solution 3: