views:

107

answers:

2

Is there a way to determine the number of available CPU cores in JavaScript, so that you could adjust the number of web workers depending on that?

+8  A: 

No, there isn't, unless you use some ActiveX.

Darin Dimitrov
Short, and to the point. +1 ;)
roe
Ok, that is what I was expecting. Still thanks!
toobb
Though there are discussions in the WHATWG mailing list about providing a similar attribute in version 2 of the spec:http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2009-November/024058.html http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-November/023993.html
toobb
+1  A: 

No. JavaScript is very far away from such hardware details, and has no legitimate mechanism to query them.

Piskvor