Blender Git Commit Log

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

By: Miika HämäläinenLast update: Nov-07-2014 14:18 MiikaHweb | 2003-2021