Skip to content

Commit

Permalink
experiment: potentially fixing an ASAN issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkae committed Aug 1, 2024
1 parent 1f853dd commit e652de2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/include/mir/test/barrier.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Barrier
void ready()
{
std::unique_lock lock(mutex);
if (--wait_threads)
if ((--wait_threads) > 0)
{
if (!cv.wait_for(lock, std::chrono::minutes(1), [&]{ return wait_threads == 0; }))
throw std::runtime_error("Timeout");
Expand Down

0 comments on commit e652de2

Please sign in to comment.