Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2021-06-08 10:37:45 +0300
committerJacques Lucke <jacques@blender.org>2021-06-08 11:39:33 +0300
commited1fc9d96bbac2ac3d4282400a9717e19e84211d (patch)
tree94892b3c1dd4a7be31124afa5084af4e165a97b6 /source/blender/compositor/intern/COM_WorkScheduler.cc
parent496045fc30f72be8d2ca32394ed233266f043152 (diff)
BLI: support disabling task isolation in task pool
Under some circumstances using task isolation can cause deadlocks. Previously, our task pool implementation would run all tasks in an isolated region. Now using task isolation is optional and can be turned on/off for individual task pools. Task pools that spawn new tasks recursively should never enable task isolation. There is a new check that finds these cases at runtime. Right now this check is disabled, so that this commit is a pure refactor. It will be enabled in an upcoming commit. This fixes T88598. Differential Revision: https://developer.blender.org/D11415
Diffstat (limited to 'source/blender/compositor/intern/COM_WorkScheduler.cc')
-rw-r--r--source/blender/compositor/intern/COM_WorkScheduler.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/compositor/intern/COM_WorkScheduler.cc b/source/blender/compositor/intern/COM_WorkScheduler.cc
index 157ded943d6..cd0139fd18e 100644
--- a/source/blender/compositor/intern/COM_WorkScheduler.cc
+++ b/source/blender/compositor/intern/COM_WorkScheduler.cc
@@ -411,7 +411,8 @@ static void threading_model_task_schedule(WorkPackage *package)
static void threading_model_task_start()
{
BLI_thread_local_create(g_thread_device);
- g_work_scheduler.task.pool = BLI_task_pool_create(nullptr, TASK_PRIORITY_HIGH);
+ g_work_scheduler.task.pool = BLI_task_pool_create(
+ nullptr, TASK_PRIORITY_HIGH, TASK_ISOLATION_ON);
}
static void threading_model_task_finish()