-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Queue.onComplete not return when queue is empty #8
Comments
I'm experiencing this as well |
Hey guys, Thanks for raising this. For me the expected behaviour is to wait until the queue has been populated and implementing the change as described could break other peoples code unexpectedly. What I would support is adding an additional optional parameter, but since its a getter - which I now see was a poor engineering decision on my part - thats not possible. Perhaps we could look at deprecating Right now im in the middle of opening up a gin/rum distillery so don't have a lot of time to sit and focus on this, but will come back to it when I get a chance - I will be using queue a fair bit I would think as I am also creating a rasperry pi controller that will be written in dart to control the still, but it will be a couple of months off. So if someone wants to implement it as above, write some tests for and submit a PR it would be gladly accepted, otherwise just need to wait up until i'm back on deck |
@rknell I can do a pull request for it, but I'm having a trouble to check if queue is empty. |
@ductranit
|
I used queue to wait for all requests finished like this:
For some reasons, if there is no valid item in for loop, the queue is empty. And in this case it pauses at
await queue.onComplete
forever.Expect: it should allow to go through next line if queue is empty.
The text was updated successfully, but these errors were encountered: