diff options
author | Jacques Lucke <jacques@blender.org> | 2021-06-16 17:29:21 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-06-16 17:29:21 +0300 |
commit | b37093de7b42cf331a4ae5830737d9972d7bb426 (patch) | |
tree | 73180f2ab3cb83719f96013afb40209ea183bf55 /source/blender/blenkernel/intern/volume.cc | |
parent | 45d59e0df5fe749d428ebf662b61844561df64c4 (diff) |
BLI: add C++ wrapper for task isolation
This makes it easier to use task isolation in c++ code.
Previously, one either had to check `WITH_TBB` (possibly indirectly
through `WITH_OPENVDB`) or one had to use the C function which
is less convenient.
Diffstat (limited to 'source/blender/blenkernel/intern/volume.cc')
-rw-r--r-- | source/blender/blenkernel/intern/volume.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/volume.cc b/source/blender/blenkernel/intern/volume.cc index 41f0b5c6b72..5e444e66a15 100644 --- a/source/blender/blenkernel/intern/volume.cc +++ b/source/blender/blenkernel/intern/volume.cc @@ -36,6 +36,7 @@ #include "BLI_math.h" #include "BLI_path_util.h" #include "BLI_string.h" +#include "BLI_task.hh" #include "BLI_utildefines.h" #include "BKE_anim_data.h" @@ -325,9 +326,8 @@ struct VolumeGrid { openvdb::io::File file(filepath); /* Isolate file loading since that's potentially multithreaded and we are - * holding a mutex lock. See BLI_task_isolate. Note OpenVDB already uses - * TBB, so it's fine to use here without a wrapper. */ - tbb::this_task_arena::isolate([&] { + * holding a mutex lock. */ + blender::threading::isolate_task([&] { try { file.setCopyMaxBytes(0); file.open(); |