You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
[HTML5] Limit the returned OS cpu count to 2.
Temporarily workaround issues due to godot spawning too many threads.
This commit is contained in:
@@ -305,7 +305,9 @@ const GodotOS = {
|
||||
|
||||
godot_js_os_hw_concurrency_get__sig: 'i',
|
||||
godot_js_os_hw_concurrency_get: function () {
|
||||
return navigator.hardwareConcurrency || 1;
|
||||
// TODO Godot core needs fixing to avoid spawning too many threads (> 24).
|
||||
const concurrency = navigator.hardwareConcurrency || 1;
|
||||
return concurrency < 2 ? concurrency : 2;
|
||||
},
|
||||
|
||||
godot_js_os_download_buffer__sig: 'viiii',
|
||||
|
||||
Reference in New Issue
Block a user