C
C#2y ago
Boggo

❔ Wait until Queue isnt empty

The obvious solution would be to run an infinite loop with an if condition, but this hardly seems an effective solution. Is there a way to pause the program until the queue has some data in it?
5 Replies
Angius
Angius2y ago
Do the check whenever you remove/add something to the queue?
Boggo
BoggoOP2y ago
I am adding items to the queue from multiple threads then i have a thread that runs purely on the Queue to operate on this
phaseshift
phaseshift2y ago
use a reset event (manual or auto - probably auto)
Boggo
BoggoOP2y ago
👍 cheers ill take a look
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server