-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: track BaseObjects with an efficient list #55104
Conversation
Review requested:
|
src/README.md
Outdated
libuv objects is performed automatically, i.e. handles are closed and requests | ||
are cancelled if possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libuv objects is performed automatically, i.e. handles are closed and requests | |
are cancelled if possible. | |
libuv objects is performed automatically, (i.e. handles are closed and requests | |
are cancelled, if possible). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion but I don't think it is necessary to add parentheses here.
src/README.md
Outdated
#### Cleanup realms and BaseObjects | ||
|
||
Realm cleanup depends on the realm types. All realms are destroyed when the | ||
[`Environment`][] is destroyed with cleanup hook. A [`ShadowRealm`][] can also |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[`Environment`][] is destroyed with cleanup hook. A [`ShadowRealm`][] can also | |
[`Environment`][] is destroyed with [a/the] cleanup hook. A [`ShadowRealm`][] can also |
74b8541
to
778da3f
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #55104 +/- ##
==========================================
- Coverage 88.24% 88.24% -0.01%
==========================================
Files 651 651
Lines 183877 183867 -10
Branches 35858 35855 -3
==========================================
- Hits 162266 162253 -13
- Misses 14901 14904 +3
Partials 6710 6710
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Commit Queue failed- Loading data for nodejs/node/pull/55104 ✔ Done loading data for nodejs/node/pull/55104 ----------------------------------- PR info ------------------------------------ Title src: track BaseObjects with an efficient list (#55104) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch legendecas:realm/base-obj -> nodejs:main Labels c++, lib / src, author ready, needs-ci Commits 1 - src: track BaseObjects with an efficient list Committers 1 - Chengzhong Wu <legendecas@gmail.com> PR-URL: https://github.com/nodejs/node/pull/55104 Refs: https://github.com/nodejs/node/pull/54880 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/55104 Refs: https://github.com/nodejs/node/pull/54880 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> -------------------------------------------------------------------------------- ℹ This PR was created on Tue, 24 Sep 2024 16:11:00 GMT ✔ Approvals: 2 ✔ - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/55104#pullrequestreview-2327733103 ✔ - Joyee Cheung (@joyeecheung) (TSC): https://github.com/nodejs/node/pull/55104#pullrequestreview-2328639766 ✘ Last GitHub CI failed ℹ Last Full PR CI on 2024-09-26T08:31:26Z: https://ci.nodejs.org/job/node-test-pull-request/62782/ - Querying data for job/node-test-pull-request/62782/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/11056331072 |
Landed in 8496670 |
I had to remove from v22.x-staging because it failed in GitHub CI (I think I didn't catch it because |
PR-URL: nodejs#55104 Refs: nodejs#54880 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Since BaseObjects are internal structs, use a linked list to efficiently
maintain the tracking list. This also makes iterating BaseObject list
efficient as it no longer needs to compare the
BaseObject::DeleteMe
cleanup callback.
Refs: #54880