process: add process.ref() and process.unref() methods#56400
Closed
jasnell wants to merge 1 commit into
Closed
Conversation
The `process.ref(...)` and `process.unref(...)` methods are intended to replace the use of `ref()` and `unref()` methods defined directly on individual API objects. The existing `ref()` and `unref()` methods will be marked as legacy and won't be removed but new APIs should use `process.ref()` and `process.unref()` instead. Refs: nodejs#53266
Collaborator
|
Review requested:
|
This comment was marked as outdated.
This comment was marked as outdated.
anonrig
approved these changes
Dec 29, 2024
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
atlowChemi
approved these changes
Dec 30, 2024
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Collaborator
jasnell
added a commit
that referenced
this pull request
Dec 31, 2024
The `process.ref(...)` and `process.unref(...)` methods are intended to replace the use of `ref()` and `unref()` methods defined directly on individual API objects. The existing `ref()` and `unref()` methods will be marked as legacy and won't be removed but new APIs should use `process.ref()` and `process.unref()` instead. Refs: #53266 PR-URL: #56400 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Member
Author
|
Landed in 35742a2 |
aduh95
pushed a commit
that referenced
this pull request
Jan 2, 2025
The `process.ref(...)` and `process.unref(...)` methods are intended to replace the use of `ref()` and `unref()` methods defined directly on individual API objects. The existing `ref()` and `unref()` methods will be marked as legacy and won't be removed but new APIs should use `process.ref()` and `process.unref()` instead. Refs: #53266 PR-URL: #56400 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
nodejs-github-bot
added a commit
that referenced
this pull request
Jan 3, 2025
Notable changes: lib: * (SEMVER-MINOR) add typescript support to STDIN eval (Marco Ippolito) #56359 module: * (SEMVER-MINOR) unflag --experimental-strip-types (Marco Ippolito) #56350 process: * (SEMVER-MINOR) add process.ref() and process.unref() methods (James M Snell) #56400 worker: * (SEMVER-MINOR) add eval ts input (Marco Ippolito) #56394 PR-URL: #56450
marco-ippolito
pushed a commit
that referenced
this pull request
Jan 3, 2025
Notable changes: lib: * (SEMVER-MINOR) add typescript support to STDIN eval (Marco Ippolito) #56359 module: * (SEMVER-MINOR) unflag --experimental-strip-types (Marco Ippolito) #56350 process: * (SEMVER-MINOR) add process.ref() and process.unref() methods (James M Snell) #56400 worker: * (SEMVER-MINOR) add eval ts input (Marco Ippolito) #56394 PR-URL: #56450
marco-ippolito
pushed a commit
that referenced
this pull request
Jan 7, 2025
Notable changes: lib: * (SEMVER-MINOR) add typescript support to STDIN eval (Marco Ippolito) #56359 module: * (SEMVER-MINOR) unflag --experimental-strip-types (Marco Ippolito) #56350 process: * (SEMVER-MINOR) add process.ref() and process.unref() methods (James M Snell) #56400 worker: * (SEMVER-MINOR) add eval ts input (Marco Ippolito) #56394 PR-URL: #56450
addaleax
reviewed
Jan 8, 2025
|
|
||
| An object is "refable" if it implements the Node.js "Refable protocol". | ||
| Specifically, this means that the object implements the `Symbol.for('node:ref')` | ||
| and `Symbol.for('node:unref')` methods. "Ref'd" objects will keep the Node.js |
Member
There was a problem hiding this comment.
@jasnell All other Node.js symbols use nodejs. as the prefix rather than node:. Can we fix that up here as well before it gets released?
Member
There was a problem hiding this comment.
Ah damn, it already is released. Welp.
The
process.ref(...)andprocess.unref(...)methods are intended to replace the use ofref()andunref()methods defined directly on individual API objects. The existingref()andunref()methods will be marked as legacy and won't be removed but new APIs should useprocess.ref()andprocess.unref()instead.Refs: #53266