Blender Git Loki

Git Commits -> Revision 1abd978

October 1, 2015, 18:44 (GMT)
BLI_task: add optional 'forced background' behavior to pools, and freefunc to tasks.

Currently, task scheduler in mono-threaded context do not have any worker thread,
which means you have to 'work_and_wait' on a pool to get its tasks done in this context.
This is not suitable for that are to be done in a complete asynchronous, background
fashion, so this commit adds:
* One worker thread to scheduler in case none is created by default;
* That worker thread only execute tasks from pools which have relevant option set
(so-called 'forced background' pools).

This commit also adds an optional freefunc callback to tasks, in case we need
more sofisticated behavior that a mere MEM_freeN...

Commit Details:

Full Hash: 1abd97850373ac3372331464be8e0f5eb8b98279
Parent Commit: 550527b
Lines Changed: +102, -31

Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18 MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2019