summaryrefslogtreecommitdiff
path: root/servers/physics_3d
diff options
context:
space:
mode:
authorIbrahn Sahir <ibrahn.sahir@gmail.com>2021-10-30 20:27:46 +0100
committerIbrahn Sahir <ibrahn.sahir@gmail.com>2021-11-01 19:19:25 +0000
commit151d2e34caff77b9b2ffcadea1e4fa0a7ddd450c (patch)
tree20007c3c0ddf14d3805458cec1cdb9cb794fe89b /servers/physics_3d
parent1aef3a42b234b86c5db21d5a64509453e6bf145c (diff)
ThreadWorkPool no longer starts worker threads if given zero work.
Diffstat (limited to 'servers/physics_3d')
-rw-r--r--servers/physics_3d/godot_step_3d.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/servers/physics_3d/godot_step_3d.cpp b/servers/physics_3d/godot_step_3d.cpp
index a8654c617b..331d65df49 100644
--- a/servers/physics_3d/godot_step_3d.cpp
+++ b/servers/physics_3d/godot_step_3d.cpp
@@ -359,11 +359,7 @@ void GodotStep3D::step(GodotSpace3D *p_space, real_t p_delta, int p_iterations)
// Warning: _solve_island modifies the constraint islands for optimization purpose,
// their content is not reliable after these calls and shouldn't be used anymore.
- if (island_count > 1) {
- work_pool.do_work(island_count, this, &GodotStep3D::_solve_island, nullptr);
- } else if (island_count > 0) {
- _solve_island(0);
- }
+ work_pool.do_work(island_count, this, &GodotStep3D::_solve_island, nullptr);
{ //profile
profile_endtime = OS::get_singleton()->get_ticks_usec();