diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-11-21 13:31:30 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-11-21 13:31:30 +0300 |
commit | 7b0c529fe211e4481fe8e459cbf11159857c611d (patch) | |
tree | 41d066884611f2dde2a3abcf4301053a656fc4a1 /source/blender/blenlib/BLI_task.h | |
parent | a5f674de3032293287423aaeb6fc53ced25f6025 (diff) |
Task scheduler: Add an option to limit number of threads per pool
This way we can have scheduler capable of scheduling tasks on all the CPUs
but in the same time we can limit tasks like baking (in the future) to use
no more than given number of threads.
Diffstat (limited to 'source/blender/blenlib/BLI_task.h')
-rw-r--r-- | source/blender/blenlib/BLI_task.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_task.h b/source/blender/blenlib/BLI_task.h index 28da673ea97..8f85bc4ec31 100644 --- a/source/blender/blenlib/BLI_task.h +++ b/source/blender/blenlib/BLI_task.h @@ -88,6 +88,9 @@ void BLI_task_pool_cancel(TaskPool *pool); /* stop all worker threads */ void BLI_task_pool_stop(TaskPool *pool); +/* set number of threads allowed to be used by this pool */ +void BLI_pool_set_num_threads(TaskPool *pool, int num_threads); + /* for worker threads, test if canceled */ bool BLI_task_pool_canceled(TaskPool *pool); |