-
Notifications
You must be signed in to change notification settings - Fork 30k
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
setImmediate regression in v6.8.0 #9084
Comments
Smells like a problem with the new linkedlist bits but I'm having a hard time pinpointing it from the diff. |
Hint: it works correctly if the |
This looks like it could be related to the re-ordering of timers and immediates. Take this code: setTimeout(() => {console.log('foo')}, 1);
setImmediate(() => {console.log('bar')});
setTimeout(() => {console.log('foo')}, 1);
setImmediate(() => {console.log('bar')}); In 6.7.0, it usually (but not always!) returns: bar
bar
foo
foo But in 6.8.0, it usually (but not always!) returns: foo
foo
bar
bar |
Docs say "if I'm understanding correctly" may be a big assumption here... |
Let's revert the change and pinpoint the issue after. |
I have a fix coming shortly. |
Proposed fix: #9086 |
This commit fixes a regression introduced in 0ed8839 that caused additional queued immediate callbacks to be ignored if `clearImmediate(immediate)` was called within the callback for `immediate`. Fixes: nodejs#9084
This commit fixes a regression introduced in 0ed8839 that caused additional queued immediate callbacks to be ignored if `clearImmediate(immediate)` was called within the callback for `immediate`. PR-URL: #9086 Fixes: #9084 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
This commit fixes a regression introduced in 0ed8839 that caused additional queued immediate callbacks to be ignored if `clearImmediate(immediate)` was called within the callback for `immediate`. PR-URL: #9086 Fixes: #9084 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
This commit fixes a regression introduced in 0ed8839 that caused additional queued immediate callbacks to be ignored if `clearImmediate(immediate)` was called within the callback for `immediate`. PR-URL: #9086 Fixes: #9084 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
See: TryGhost/Ghost#7555
Moving from: #8655 (comment)
Regression from
timers: improve setImmediate() performance
(#8655)cc @ErisDS, @thealphanerd, @mscdex, @Trott, @kirrg001
The text was updated successfully, but these errors were encountered: