Blender Git Loki

Git Commits -> Revision d617de9

Revision d617de9 by Bastien Montagne (master)
December 27, 2015, 23:37 (GMT)
Fix (unreported) broken BLI_task's forloop func in case we have less iterations that workers.

When called with very small range, `BLI_task_parallel_range_ex()` would generate a zero `chunk_size`,
leading to some infinite looping in `parallel_range_func` due to `parallel_range_next_iter_get` returning
true without actually increasing the counter!

So now, we ensure `chunk_size` and `num_tasks` are always at least 1 (and avoid generating too much tasks too).

Commit Details:

Full Hash: d617de965ea20e5d563fa134b4910a67c4d8229d
Parent Commit: 7ef10de
Lines Changed: +3, -1

1 Modified Path:

/source/blender/blenlib/intern/task.c (+3, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021