Blender Git Loki

Git Commits -> Revision 18c2a44

Revision 18c2a44 by Bastien Montagne (master)
March 3, 2017, 16:12 (GMT)
Fix ugly mistake in BLI_task - freeing while some tasks are still being processed.

Freeing pool was calling `BLI_task_pool_stop()`, which only clears
pool's tasks that are in TODO queue, whithout ensuring no more tasks
from that pool are being processed in worker threads.

This could lead to use-after-free random (and seldom) crashes.

Now use instead `BLI_task_pool_cancel()`, which does waits for all tasks
being processed to finish, before returning.

Commit Details:

Full Hash: 18c2a443336dea839c028dcc98f8021b98c2a5ca
Parent Commit: 5f05dac
Lines Changed: +1, -1

1 Modified Path:

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