Skip to content

Commit

Permalink
improve dijkstra termination detection implementation: removing lock …
Browse files Browse the repository at this point in the history
…from criticial path
  • Loading branch information
JiakunYan committed Feb 5, 2024
1 parent 76bcb86 commit f37c5ee
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,11 @@ namespace hpx { namespace components { namespace server {
void runtime_support::dijkstra_make_black()
{
// Rule 1: A machine sending a message makes itself black.
std::lock_guard<dijkstra_mtx_type> l(dijkstra_mtx_);
dijkstra_color_ = true;
if (!dijkstra_color_)
{
std::lock_guard<dijkstra_mtx_type> l(dijkstra_mtx_);
dijkstra_color_ = true;
}
}

void runtime_support::send_dijkstra_termination_token(
Expand Down

0 comments on commit f37c5ee

Please sign in to comment.