1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

ThreadWorkPool no longer starts worker threads if given zero work.

This commit is contained in:
Ibrahn Sahir
2021-10-30 20:27:46 +01:00
parent 1aef3a42b2
commit 151d2e34ca
3 changed files with 22 additions and 14 deletions

View File

@@ -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();