Hey, I was just looking at your code here and noticed that you didn't check insertionIndex for wrap-around cases in the HasHigherPriority function. It's probably not noticeable, but if one PriorityQueue was used for a long time, it could potentially cause issues there. But then again, it is kind of a rare case, so I don't know if it's worth it to do the proper checks every time.
The insertionIndex is a 64-bit long. If you inserted 1 million nodes a second, it would take 290,000 years to wrap around. It's not something I'm concerned about.
Hey, I was just looking at your code here and noticed that you didn't check insertionIndex for wrap-around cases in the HasHigherPriority function. It's probably not noticeable, but if one PriorityQueue was used for a long time, it could potentially cause issues there. But then again, it is kind of a rare case, so I don't know if it's worth it to do the proper checks every time.
Just thought I'd let you know.