-
-
Notifications
You must be signed in to change notification settings - Fork 146
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 broken when throwing from done()
(dev-master only)
#102
Comments
Thanks for reporting. I've already noticed that myself, here's a patch that fixes that: master...jsor-labs:fix-queue The alternative approach is #97 but you're probably right, we should consider handling exceptions thrown from drain() (though, theoretically that should never happen). |
The proposed solution would just hide a second exception if there were two, no? It's probably best to just not rethrow but to use |
Yes, that was just a prototype. I stopped working on it in favor of #97. |
I'm not sure I'm of much help here, as I'm not sure I follow, please help me understand and document this from a consumer's perspective. This ticket makes it sound like there's some major bug in this library, but as far as I can tell the issue you're seeing (or rather contriving?) is that you're throwing from the I'm not saying that this situation couldn't be improved, but I think we should spend the time to help communicate this issue first. The title "Queue broken after one exception" is clearly misleading here (also, what "queue"?), may I ask either of you guys to change this to reflect what is actually going on here? Thank you! |
While not being allowed, it might happen. And if it happens, then the entire promise library is broken.
Yes, it is, but as it's not released yet, it doesn't matter too much for now.
The only one that exists, it's only in |
done()
(dev-master only)
I believe this has been answered and resolved via #97, so I'm closing this for now. Please come back with more details if this problem persists and we can always reopen this 👍 |
In case there's something enqueued that throws, the queue is never drained again if it wasn't empty after throwing.
It's a specially crafted example, not sure whether it will ever happen accidentally. #97 mostly solves this, but should probably also trigger fatal errors thrown from callbacks called in
Queue::drain()
.The text was updated successfully, but these errors were encountered: