Page Menu
Home
Search
Configure Global Search
Log In
Paste
P2142
(An Untitled Masterwork)
Active
Public
Actions
Authored by
Jacques Lucke (JacquesLucke)
on May 28 2021, 11:55 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Tags
None
Subscribers
None
diff --git a/source/blender/blenlib/intern/task_pool.cc b/source/blender/blenlib/intern/task_pool.cc
index 6404f5264cc..b098264f72d 100644
--- a/source/blender/blenlib/intern/task_pool.cc
+++ b/source/blender/blenlib/intern/task_pool.cc
@@ -367,7 +367,7 @@ static void background_task_pool_free(TaskPool *pool)
static TaskPool *task_pool_create_ex(void *userdata, TaskPoolType type, TaskPriority priority)
{
- const bool use_threads = BLI_task_scheduler_num_threads() > 1 && type != TASK_POOL_NO_THREADS;
+ const bool use_threads = BLI_task_scheduler_num_threads() >= 1 && type != TASK_POOL_NO_THREADS;
/* Background task pool uses regular TBB scheduling if available. Only when
* building without TBB or running with -t 1 do we need to ensure these tasks
diff --git a/source/blender/depsgraph/intern/depsgraph_eval.cc b/source/blender/depsgraph/intern/depsgraph_eval.cc
index 1ad3fdbc9da..76ddf5e1e71 100644
--- a/source/blender/depsgraph/intern/depsgraph_eval.cc
+++ b/source/blender/depsgraph/intern/depsgraph_eval.cc
@@ -45,6 +45,8 @@
#include "intern/depsgraph.h"
+#include "tbb/task_arena.h"
+
namespace deg = blender::deg;
static void deg_flush_updates_and_refresh(deg::Depsgraph *deg_graph)
@@ -70,7 +72,9 @@ void DEG_evaluate_on_refresh(Depsgraph *graph)
deg_graph->ctime = ctime;
}
- deg_flush_updates_and_refresh(deg_graph);
+ tbb::this_task_arena::isolate([&]() {
+ deg_flush_updates_and_refresh(deg_graph);
+ });
}
/* Frame-change happened for root scene that graph belongs to. */
Event Timeline
Jacques Lucke (JacquesLucke)
created this paste.
May 28 2021, 11:55 AM
Jacques Lucke (JacquesLucke)
mentioned this in
D11415: Fix T88598: Support disabling task isolation in task pool.
.
May 28 2021, 12:00 PM
Log In to Comment