4ed1d977fc
Some platforms (*cough* web *cough*) have hard limits on the number of threads that can be spawned. Currently, ThreadPoolWork (mostly used in rendering/physics servers) will spawn as many threads as CPUs available causing exception on machines with high CPU count. This commit adds a new overridable method to OS that returns the default thread pool size (still the CPU count by default), and overrides it for the JavaScript platform so it always allocate only one thread. We can likely improve the whole ThreadPoolWork in the future to always allocate X amount of threads, and assign jobs to them on the fly, but that will require some more architectural changes. |
||
---|---|---|
.. | ||
android | ||
iphone | ||
javascript | ||
linuxbsd | ||
osx | ||
uwp | ||
windows | ||
register_platform_apis.h | ||
SCsub |