From 04ac8768efc342997f941f08688398c1d90bec79 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 2 Nov 2015 16:57:48 +0100 Subject: 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 --- source/blender/blenlib/BLI_task.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/blenlib/BLI_task.h') 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( -- cgit v1.2.3