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. |
||
---|---|---|
.. | ||
api | ||
export | ||
js | ||
.eslintrc.engine.js | ||
.eslintrc.js | ||
.eslintrc.libs.js | ||
audio_driver_javascript.cpp | ||
audio_driver_javascript.h | ||
detect.py | ||
display_server_javascript.cpp | ||
display_server_javascript.h | ||
dom_keys.inc | ||
emscripten_helpers.py | ||
godot_audio.h | ||
godot_js.h | ||
http_client_javascript.cpp | ||
http_client_javascript.h | ||
javascript_main.cpp | ||
javascript_runtime.cpp | ||
javascript_singleton.cpp | ||
logo.png | ||
os_javascript.cpp | ||
os_javascript.h | ||
package-lock.json | ||
package.json | ||
platform_config.h | ||
README.md | ||
run_icon.png | ||
SCsub |
HTML5 platform port
This folder contains the C++ and JavaScript code for the HTML5/WebAssembly platform port, compiled using Emscripten.
It also contains a ESLint linting setup (see package.json
).
See also misc/dist/html
folder for files used by this platform
such as the HTML5 shell.
Artwork license
logo.png
and run_icon.png
are licensed under
Creative Commons Attribution 3.0 Unported
per the HTML5 logo usage guidelines.