Skip to content

Commit

Permalink
[transform_hierarchy] fixed an issue where transform_hierarchy would …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
harrand committed Jan 31, 2024
1 parent 9240102 commit 256b8ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tz/core/data/transform_hierarchy.inl
Original file line number Diff line number Diff line change
Expand Up @@ -326,15 +326,15 @@ 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);
}
});
}
for(std::size_t i = node.children.size() - remainder_children; i < node.children.size(); i++)
{
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)
{
Expand Down

0 comments on commit 256b8ed

Please sign in to comment.