C
C#3mo ago
Coolbeans

Priority queue, queue empty error.

Hi, I am getting an error when trying to use the peek method that says that the queue is empty. However just before this I use the enqueue method to put something into it. Why is this error occurring?
No description
2 Replies
Buddy
Buddy3mo ago
I suggest to put breakpoints at the line of exception AND on the while-loop Then check the queue
Coolbeans
CoolbeansOP3mo ago
Thank you!! I have just checked and I think its being dequeued somewhere without putting anything back in which it shouldn't be doing.
Want results from more Discord servers?
Add your server