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
src: check microtasks before running them #29434
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bnoordhuis
approved these changes
Sep 4, 2019
MicrotasksScope::PerformCheckpoint() is basically Isolate::RunMicrotasks() with a nesting guard, right? LGTM if that's the case.
|
@bnoordhuis yep! It just runs conditionally on: |
devnexen
approved these changes
Sep 4, 2019
addaleax
approved these changes
Sep 4, 2019
devsnek
approved these changes
Sep 4, 2019
cjihrig
approved these changes
Sep 4, 2019
Trott
approved these changes
Sep 4, 2019
|
Can't think of a simple/reliable way to test this, so LGTM without one, but commenting in case someone else has an idea. |
lpinca
approved these changes
Sep 4, 2019
BridgeAR
approved these changes
Sep 4, 2019
JungMinu
approved these changes
Sep 6, 2019
Trott
pushed a commit
that referenced
this issue
Sep 6, 2019
PR-URL: #29434 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
|
Landed in 63b056d |
nornagon
added a commit
to nornagon/node-1
that referenced
this issue
Sep 16, 2019
This is a continuation of nodejs#29434, rewriting the last remaining call to RunMicrotasks.
4 tasks
targos
pushed a commit
that referenced
this issue
Sep 20, 2019
PR-URL: #29434 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
6 tasks
Trott
pushed a commit
that referenced
this issue
Sep 23, 2019
This is a continuation of #29434, rewriting the last remaining call to RunMicrotasks. PR-URL: #29581 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
targos
pushed a commit
that referenced
this issue
Sep 23, 2019
This is a continuation of #29434, rewriting the last remaining call to RunMicrotasks. PR-URL: #29581 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Merged
BridgeAR
pushed a commit
that referenced
this issue
Sep 25, 2019
This is a continuation of #29434, rewriting the last remaining call to RunMicrotasks. PR-URL: #29581 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
codebytere
added a commit
to electron/electron
that referenced
this issue
Oct 15, 2019
codebytere
added a commit
to electron/electron
that referenced
this issue
Oct 15, 2019
codebytere
added a commit
to electron/electron
that referenced
this issue
Oct 17, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
c++
Issues and PRs that require attention from people who are familiar with C++.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Refs electron/electron#20013.
Previously, Node.js unilaterally ran microtasks on next tick; since Electron also handles microtask resolution this created an issue whereby the microtask queue would attempt to be pumped while previous tasks were still running.
To address this issue, i've changed the
RunMicrotaskscall to aPerformCheckpointcall, which adds checks to only run microtasks if none are in progress, and otherwise proceeds normally.Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes