godot/platform
Fabio Alessandrelli 4ed1d977fc [OS] Add ThreadWorkPool default size to OS.
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.
2021-11-02 04:16:00 +01:00
..
android Fix new projects always being created with OpenGL 2021-11-01 22:04:36 +01:00
iphone Fix new projects always being created with OpenGL 2021-11-01 22:04:36 +01:00
javascript [OS] Add ThreadWorkPool default size to OS. 2021-11-02 04:16:00 +01:00
linuxbsd Add support for PowerPC family 2021-11-01 22:25:53 +01:00
osx [macOS] Add create_instance function to spawn editor copies. 2021-11-01 11:48:23 +02:00
uwp Use OpenGL 3.3 core profile instead of compatibility profile 2021-10-31 15:56:45 +01:00
windows Use OpenGL 3.3 core profile instead of compatibility profile 2021-10-31 15:56:45 +01:00
register_platform_apis.h Update copyright statements to 2021 2021-01-01 20:19:21 +01:00
SCsub SCons: Format buildsystem files with psf/black 2020-03-30 09:05:53 +02:00