From 256b8ed7bbf566bf214da445a4068ab38302922c Mon Sep 17 00:00:00 2001 From: harrand Date: Wed, 31 Jan 2024 03:34:17 +0000 Subject: [PATCH] [transform_hierarchy] fixed an issue where transform_hierarchy would produce a very high amount of dependent jobs, causing deadlock. instead, this risk is now entirely gone, but work may not be spread well across threads - best case scenario is all children of a node have a similar number of children themselves --- src/tz/core/data/transform_hierarchy.inl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tz/core/data/transform_hierarchy.inl b/src/tz/core/data/transform_hierarchy.inl index 4dc412afbd..f55ee0a634 100644 --- a/src/tz/core/data/transform_hierarchy.inl +++ b/src/tz/core/data/transform_hierarchy.inl @@ -326,7 +326,7 @@ namespace tz for(std::size_t j = 0; j < child_count; j++) { unsigned int child = node.children[j + offset]; - callback(child); this->iterate_descendants(child, callback, true); + callback(child); this->iterate_descendants(child, callback, false); } }); } @@ -334,7 +334,7 @@ namespace tz { unsigned int child = node.children[i]; callback(child); - this->iterate_descendants(child, callback, true); + this->iterate_descendants(child, callback, false); } for(tz::job_handle jh : jobs) {