Skip to content

Commit

Permalink
Set pre_main status before launching run_helper
Browse files Browse the repository at this point in the history
This fixes a race where `runtime_impl::run_helper` could set the runtime status to `running` before `runtime_impl::start` sets the status to `pre_main` (the status would then be stuck at `pre_main` instead of `running` after actually starting the runtime).
  • Loading branch information
msimberg committed Feb 26, 2018
1 parent a3faea3 commit 53eed5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime_impl.cpp
Expand Up @@ -356,9 +356,9 @@ namespace hpx {
"run_helper", 0, threads::thread_priority_normal, std::size_t(-1),
threads::get_stack_size(threads::thread_stacksize_large));

this->runtime::starting();
threads::thread_id_type id = threads:: invalid_thread_id;
thread_manager_->register_thread(data, id);
this->runtime::starting();

// }}}

Expand Down

0 comments on commit 53eed5b

Please sign in to comment.