Commit 70f72790 by FritzFlorian

Fix: set correct 'currently executing' in fork_join task.

This is required to correctly execute multiple, consecutive wait_for_all calls in one fork_join_sub_task.
parent ada8fe0d
Pipeline #1182 passed with stages
in 3 minutes 48 seconds
......@@ -21,14 +21,10 @@ fork_join_sub_task::fork_join_sub_task(const fork_join_sub_task &other) :
void fork_join_sub_task::execute() {
PROFILE_WORK_BLOCK("execute sub_task")
auto last_executing = tbb_task_->currently_executing_;
tbb_task_->currently_executing_ = this;
if (executed) {
PLS_ERROR("Double Execution!")
}
executed = true;
executed_at = base::this_thread::state<thread_state>()->id_;
execute_internal();
tbb_task_->currently_executing_ = nullptr;
tbb_task_->currently_executing_ = last_executing;
PROFILE_END_BLOCK
wait_for_all();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment