Commit b2facef
os: add availableParallelism()
This commit exposes uv_available_parallelism() as an alternative
to cpus().length. uv_available_parallelism() is inspired by
Rust's available_parallelism().
PR-URL: #45895
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>1 parent 48e3ad3 commit b2facefCopy full SHA for b2facef
File tree
Expand file treeCollapse file tree
4 files changed
+28
-0
lines changedOpen diff view settings
Filter options
- doc/api
- lib
- src
- test/parallel
Expand file treeCollapse file tree
4 files changed
+28
-0
lines changedOpen diff view settings
Collapse file
+14Lines changed: 14 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
26 | 26 | |
27 | 27 | |
28 | 28 | |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
29 | 42 | |
30 | 43 | |
31 | 44 | |
| ||
1338 | 1351 | |
1339 | 1352 | |
1340 | 1353 | |
| 1354 | + |
Collapse file
+3Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
45 | 45 | |
46 | 46 | |
47 | 47 | |
| 48 | + |
48 | 49 | |
49 | 50 | |
50 | 51 | |
| ||
100 | 101 | |
101 | 102 | |
102 | 103 | |
| 104 | + |
103 | 105 | |
104 | 106 | |
105 | 107 | |
| ||
364 | 366 | |
365 | 367 | |
366 | 368 | |
| 369 | + |
367 | 370 | |
368 | 371 | |
369 | 372 | |
|
Collapse file
+7Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
380 | 380 | |
381 | 381 | |
382 | 382 | |
| 383 | + |
| 384 | + |
| 385 | + |
| 386 | + |
383 | 387 | |
384 | 388 | |
385 | 389 | |
| ||
397 | 401 | |
398 | 402 | |
399 | 403 | |
| 404 | + |
| 405 | + |
400 | 406 | |
401 | 407 | |
402 | 408 | |
| ||
417 | 423 | |
418 | 424 | |
419 | 425 | |
| 426 | + |
420 | 427 | |
421 | 428 | |
422 | 429 | |
|
Collapse file
+4Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
255 | 255 | |
256 | 256 | |
257 | 257 | |
| 258 | + |
| 259 | + |
258 | 260 | |
259 | 261 | |
260 | 262 | |
| ||
264 | 266 | |
265 | 267 | |
266 | 268 | |
| 269 | + |
| 270 | + |
0 commit comments