Skip to content

Why os.availableparallelism() over os.cpus().length? #4743

Answered by bnoordhuis
cnrmurphy asked this question in Q&A
Discussion options

You must be logged in to vote

libuv/libuv#3493 (comment) - in a nutshell: os.cpus() returns the online cpus but that doesn't help you if you're pinned to a subset of them.

it's supposed to be explained in the docs but maybe it's only in the libuv docs at the moment. PR welcome if that's the case.

Replies: 0 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by cjihrig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants