Skip to content

Commit

Permalink
Merge pull request #52 from psychocoderHPC/fix-threadSanitizerError
Browse files Browse the repository at this point in the history
fix data race in test
  • Loading branch information
michaelsippel authored Dec 14, 2023
2 parents 0d58d87 + 1176125 commit 1f5cd1b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/cv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
#include <catch2/catch_test_macros.hpp>
#include <thread>
#include <redGrapes/sync/cv.hpp>
#include <atomic>

TEST_CASE("CV")
{
for(int i=0; i< 5000; ++i)
{
volatile bool finished = false;
std::atomic<bool> finished = {false};
volatile bool start = false;

redGrapes::CondVar cv;
Expand Down

0 comments on commit 1f5cd1b

Please sign in to comment.