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
This commit is contained in:
@@ -663,7 +663,7 @@ void BKE_ocean_simulate(struct Ocean *o, float t, float scale, float chop_amount
|
||||
osd.scale = scale;
|
||||
osd.chop_amount = chop_amount;
|
||||
|
||||
pool = BLI_task_pool_create(&osd, TASK_PRIORITY_HIGH);
|
||||
pool = BLI_task_pool_create(&osd, TASK_PRIORITY_HIGH, TASK_ISOLATION_ON);
|
||||
|
||||
BLI_rw_mutex_lock(&o->oceanmutex, THREAD_LOCK_WRITE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user