开发者

Does the HTML5 worker threads feature expose the number of cores on a machine? [duplicate]

开发者 https://www.devze.com 2023-02-05 10:27 出处:网络
This question already has answers here: Get number of CPU cores in JavaScript? (5 answers) 开发者_如何学编程
This question already has answers here: Get number of CPU cores in JavaScript? (5 answers) 开发者_如何学编程 Closed 6 years ago.

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?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消