-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Awaitable q.push doesn't resolve when queue worker throws an error #1659
Comments
I'm considering making |
Resolving with an error may be an option but you will need to test the
The really important thing is that promises will not be forever pending, so you can select the best option you think ;-) |
I like the |
Thank you very much ! |
@aearly was this ever implemented? |
It was, see https://caolan.github.io/async/v3/docs.html#QueueObject : |
await q.push(task)
is not safe for use for the moment because the promise returned byq.push
never resolve nor reject if the queue worker throws an error. I understand thatawait q.push(task)
cannot throw an error because of the backward compatibility of this method and its optional callback parameter (the push and forget feature). Aq.asyncPush(task)
method that rejects its promise shouldn't be feasible ?You can show the problem with this code (in node or browser without the require):
Originally posted by @darksabrefr in #1641 (comment)
The text was updated successfully, but these errors were encountered: