Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instancer : Add missing task_group_contexts when launching threads #4194

Merged

Conversation

danieldresser-ie
Copy link
Contributor

I know it can be pretty tricky to demonstrate what situations this actually goes wrong in, so for the moment I've just added the obvious missing task_group_contexts - is this good enough as a PR?

Copy link
Member

@johnhaddon johnhaddon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Daniel. As well as taking care of the inline comments, could you also target the PR to 0.59_maintenance please...

@@ -1356,6 +1356,8 @@ void Instancer::hash( const Gaffer::ValuePlug *output, const Gaffer::Context *co

IECore::ConstCompoundDataPtr prototypeChildNames = this->prototypeChildNames( parentPath, context );

tbb::task_group_context taskGroupContext( tbb::task_group_context::isolated );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be passed as an argument to parallel_for.

@@ -1637,6 +1639,8 @@ void Instancer::compute( Gaffer::ValuePlug *output, const Gaffer::Context *conte

vector<InternedString> branchPath( { namePlug()->getValue() } );

tbb::task_group_context taskGroupContext( tbb::task_group_context::isolated );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be passed as an argument to parallel_for.

@danieldresser-ie danieldresser-ie changed the base branch from master to 0.59_maintenance April 8, 2021 20:49
@danieldresser-ie
Copy link
Contributor Author

Apologies for the sloppy PR, fixed now.

@johnhaddon johnhaddon merged commit fb9ce8b into GafferHQ:0.59_maintenance Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants