High-Speed-Priority-Queue-for-C-Sharp
High-Speed-Priority-Queue-for-C-Sharp copied to clipboard
Add SimplePriorityQueue.Try...() overloads that expose priority as out parameter
- Add
SimplePriorityQueue.TryDequeue()overload without TPriorityparameter and relevant unit tests - Add
SimplePriorityQueue.TryRemove()overload without TPriorityparameter and relevant unit tests - Add
SimplePriorityQueue.TryFirst()overload without TPriorityparameter and relevant unit tests
In each case if the caller wants the priority of the head/head-to-be-removed/node-to-be-removed, they can now get it without an additional (Try)GetPriority call, making it easier to remain thread-safe while also avoiding an extra _itemToNodesCache lookup.
See issue https://github.com/BlueRaja/High-Speed-Priority-Queue-for-C-Sharp/issues/54