We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Using bluebird 3.2.2 Similar to #926 with timeout When canceling a Promise.delay the internally used timeout is not cleared and the process will hang
bluebird 3.2.2
timeout
Promise.delay
var Promise = require('bluebird'); Promise.config({cancellation: true}); process.on('exit', function() { console.log(new Date(), 'Process exiting'); }); console.log(new Date(), 'Starting'); var delayPromise = Promise.delay(10000); delayPromise.finally(function () { if (delayPromise.isCancelled()) { console.log(new Date(), 'Cancelled'); } }); setTimeout(function() { console.log(new Date(), 'Cancelling promise'); delayPromise.cancel(); }, 1000);
Output -
Tue Feb 09 2016 05:17:03 GMT+0000 (UTC) 'Starting' Tue Feb 09 2016 05:17:04 GMT+0000 (UTC) 'Canceling promise' Tue Feb 09 2016 05:17:04 GMT+0000 (UTC) 'Cancelled' Tue Feb 09 2016 05:17:13 GMT+0000 (UTC) 'Process exiting'
Notice the 10 seconds delay between the promise being canceled and the process exiting
The text was updated successfully, but these errors were encountered:
FIXES petkaantonov#1000
23f262e
5b8a59a
No branches or pull requests
Using
bluebird 3.2.2
Similar to #926 with
timeout
When canceling aPromise.delay
the internally used timeout is not cleared and the process will hangOutput -
Notice the 10 seconds delay between the promise being canceled and the process exiting
The text was updated successfully, but these errors were encountered: