Skip to content

Commit

Permalink
Update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
TrentHouliston committed Sep 15, 2023
1 parent dc60ae7 commit dd0e06e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/threading/TaskScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,9 @@ namespace threading {
}

// Wait for something to happen!
// We cannot have a condition on this lock as the check would be this doing this loop again to see if there
// are any tasks we can execute (checking all the groups)
// Putting a condition on this lock is normally used to stop spurious wakeups of which the cost would be
// equal to the check.
// We don't have a condition on this lock as the check would be this doing this loop again to see if there
// are any tasks we can execute (checking all the groups) so therefore we already did the entry predicate.
// Putting a condition on this would stop spurious wakeups of which the cost would be equal to running again
condition.wait(lock); // NOSONAR
}

Expand Down

0 comments on commit dd0e06e

Please sign in to comment.