Commit 8dc39e5
process: add process.ref() and process.unref() methods
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>1 parent c2f4d8d commit 8dc39e5Copy full SHA for 8dc39e5
File tree
Expand file treeCollapse file tree
4 files changed
+110
-0
lines changedOpen diff view settings
Filter options
- doc/api
- lib/internal
- bootstrap
- process
- test/parallel
Expand file treeCollapse file tree
4 files changed
+110
-0
lines changedOpen diff view settings
Collapse file
+34Lines changed: 34 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3228 | 3228 | |
3229 | 3229 | |
3230 | 3230 | |
| 3231 | + |
| 3232 | + |
| 3233 | + |
| 3234 | + |
| 3235 | + |
| 3236 | + |
| 3237 | + |
| 3238 | + |
| 3239 | + |
| 3240 | + |
| 3241 | + |
| 3242 | + |
| 3243 | + |
| 3244 | + |
| 3245 | + |
| 3246 | + |
| 3247 | + |
3231 | 3248 | |
3232 | 3249 | |
3233 | 3250 | |
| ||
4268 | 4285 | |
4269 | 4286 | |
4270 | 4287 | |
| 4288 | + |
| 4289 | + |
| 4290 | + |
| 4291 | + |
| 4292 | + |
| 4293 | + |
| 4294 | + |
| 4295 | + |
| 4296 | + |
| 4297 | + |
| 4298 | + |
| 4299 | + |
| 4300 | + |
| 4301 | + |
| 4302 | + |
| 4303 | + |
| 4304 | + |
4271 | 4305 | |
4272 | 4306 | |
4273 | 4307 | |
|
Collapse file
lib/internal/bootstrap/node.js
Copy file name to clipboardExpand all lines: lib/internal/bootstrap/node.js+2Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
178 | 178 | |
179 | 179 | |
180 | 180 | |
| 181 | + |
| 182 | + |
181 | 183 | |
182 | 184 | |
183 | 185 | |
|
Collapse file
lib/internal/process/per_thread.js
Copy file name to clipboardExpand all lines: lib/internal/process/per_thread.js+14Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
13 | 13 | |
14 | 14 | |
15 | 15 | |
| 16 | + |
16 | 17 | |
17 | 18 | |
18 | 19 | |
| ||
26 | 27 | |
27 | 28 | |
28 | 29 | |
| 30 | + |
29 | 31 | |
30 | 32 | |
31 | 33 | |
| ||
418 | 420 | |
419 | 421 | |
420 | 422 | |
| 423 | + |
| 424 | + |
| 425 | + |
| 426 | + |
| 427 | + |
| 428 | + |
| 429 | + |
| 430 | + |
| 431 | + |
| 432 | + |
421 | 433 | |
422 | 434 | |
423 | 435 | |
| ||
427 | 439 | |
428 | 440 | |
429 | 441 | |
| 442 | + |
| 443 | + |
430 | 444 | |
Collapse file
test/parallel/test-process-ref-unref.js
Copy file name to clipboard+60Lines changed: 60 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
0 commit comments