Skip to content

Commit 976016b

Browse files
committed
Revert "Prevent crashing if max_threads is zero."
This reverts commit a1788e0.
1 parent a1788e0 commit 976016b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/object/worker_thread_pool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ void WorkerThreadPool::init(int p_thread_count, float p_low_priority_task_ratio)
780780

781781
runlevel = RUNLEVEL_NORMAL;
782782

783-
if (p_thread_count <= 0) {
783+
if (p_thread_count < 0) {
784784
p_thread_count = OS::get_singleton()->get_default_thread_pool_size();
785785
}
786786

doc/classes/ProjectSettings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3404,7 +3404,7 @@
34043404
The ratio of [WorkerThreadPool]'s threads that will be reserved for low-priority tasks. For example, if 10 threads are available and this value is set to [code]0.3[/code], 3 of the worker threads will be reserved for low-priority tasks. The actual value won't exceed the number of CPU cores minus one, and if possible, at least one worker thread will be dedicated to low-priority tasks.
34053405
</member>
34063406
<member name="threading/worker_pool/max_threads" type="int" setter="" getter="" default="-1">
3407-
Maximum number of threads to be used by [WorkerThreadPool]. Value of [code]0[/code] or less means [code]1[/code] on Web, or a number of [i]logical[/i] CPU cores available on other platforms (see [method OS.get_processor_count]).
3407+
Maximum number of threads to be used by [WorkerThreadPool]. Value of [code]-1[/code] means [code]1[/code] on Web, or a number of [i]logical[/i] CPU cores available on other platforms (see [method OS.get_processor_count]).
34083408
</member>
34093409
<member name="xr/openxr/binding_modifiers/analog_threshold" type="bool" setter="" getter="" default="false">
34103410
If [code]true[/code], enables the analog threshold binding modifier if supported by the XR runtime.

0 commit comments

Comments
 (0)