loop: add pending work to loop-alive check#3466
Merged
Merged
Conversation
bnoordhuis
approved these changes
Feb 9, 2022
bnoordhuis
left a comment
Member
There was a problem hiding this comment.
LGTM but with a suggestion to tweak the boolean logic for comprehensibility.
Pending work may be either (on any platform) pending_queue callbacks or (on unix) watcher_queue handles to add to the io poll object. Previously, we might have gotten somewhat stuck if the user caused an event to be added to one of these in the idle or prepare callbacks, or was embedding libuv. Refs: libuv#3234 Refs: libuv#3101 Refs: libuv#3308
180bb0d to
f46d605
Compare
Member
Author
|
I changed the |
bnoordhuis
approved these changes
Feb 12, 2022
Member
Author
|
I am somewhat suspicious that this may have broken the fork_signal_to_child test, as UV_RUN_ONCE is a very risky thing to test, and we always initialize the loop with pending work. |
This was referenced Feb 13, 2022
vtjnash
added a commit
to vtjnash/libuv
that referenced
this pull request
Feb 14, 2022
I created `uv__backend_timeout` to be used internally for this reason, then forgot to use it, resulting in flaky tests and excessive trips around the uv_run loop. Fix libuv#3472
vtjnash
added a commit
that referenced
this pull request
Feb 14, 2022
bnoordhuis
added a commit
to bnoordhuis/libuv
that referenced
this pull request
Apr 2, 2022
This reverts commit 939a056. This reverts commit cc7dbaa. Reverted for causing a regression in the Node.js test suite. Also revert "fix oopsie from libuv#3466 (libuv#3475)". Refs: nodejs/node#42340
JeffroMF
pushed a commit
to JeffroMF/libuv
that referenced
this pull request
May 16, 2022
Pending work may be either (on any platform) pending_queue callbacks or (on unix) watcher_queue handles to add to the io poll object. Previously, we might have gotten somewhat stuck if the user caused an event to be added to one of these in the idle or prepare callbacks, or was embedding libuv. Refs: libuv#3234 Refs: libuv#3101 Refs: libuv#3308
JeffroMF
pushed a commit
to JeffroMF/libuv
that referenced
this pull request
May 16, 2022
I created `uv__backend_timeout` to be used internally for this reason, then forgot to use it, resulting in flaky tests and excessive trips around the uv_run loop. Fix libuv#3472
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.Suggestion cannot be applied right now. Please check back later.
Pending work may be either (on any platform) pending_queue callbacks or
(on unix) watcher_queue handles to add to the io poll object.
Previously, we might have gotten somewhat stuck if the user caused an
event to be added to one of these in the idle or prepare callbacks, or
was embedding libuv.
Refs: #3234
Refs: #3101
Refs: #3308