diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-11-02 18:57:48 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-11-02 18:57:48 +0300 |
commit | 04ac8768efc342997f941f08688398c1d90bec79 (patch) | |
tree | 920b490353401e322385cbc38b8a7022da2e0cae /source/blender/blenlib/BLI_task.h | |
parent | 44774f81606f74b0268f7e6fa58e67f1f8c28ca7 (diff) |
BLI_task: add support for full-background taskpools.
With current code, in single-threaded context, a pool of task may never be executed
until one calls BLI_task_pool_work_and_wait() on it, this is not acceptable for
asynchronous tasks where you never want to actually lock the main thread.
This commits adds an extra thread in single-threaded case, and a new 'type' of pool,
such that one can create real background pools of tasks. See code for details.
Review: D1565
Diffstat (limited to 'source/blender/blenlib/BLI_task.h')
-rw-r--r-- | source/blender/blenlib/BLI_task.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_task.h b/source/blender/blenlib/BLI_task.h index 3bf58a64307..81c277cd956 100644 --- a/source/blender/blenlib/BLI_task.h +++ b/source/blender/blenlib/BLI_task.h @@ -77,6 +77,7 @@ typedef void (*TaskRunFunction)(TaskPool *__restrict pool, void *taskdata, int t typedef void (*TaskFreeFunction)(TaskPool *__restrict pool, void *taskdata, int threadid); TaskPool *BLI_task_pool_create(TaskScheduler *scheduler, void *userdata); +TaskPool *BLI_task_pool_create_background(TaskScheduler *scheduler, void *userdata); void BLI_task_pool_free(TaskPool *pool); void BLI_task_pool_push_ex( |