Does the HTML5 worker threads feature expose the number of cores on a machine? [duplicate]
-
12-10-2019 - |
Question
This question already has an answer here:
- Get number of CPU cores in JavaScript? 5 answers
I'm playing with HTML5 worker threads and I want to partition out some work according to available cores. Is there a way to get the number of cores on the machine from JavaScript?
Solution
You can try to estimate the number of cores with: https://github.com/oftn/core-estimator
demo: http://eligrey.com/blog/post/cpu-core-estimation-with-javascript
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow