Commit ea9a058
authored
Update thread count calculation method in worker_threads example (WiseLibs#1268)
The Node.js documentation states that `os.cpus()` should not be used to calculate the amount of threads an app should launch because CPU information might be unavailable.
In Node.js v19.4.0 and v18.14.0, `os.availableParallelism()` was added for that purpose.1 parent 6f9d37c commit ea9a058
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
0 commit comments