From e1b88ef535d36323087e7f668c1623cb1451b10d Mon Sep 17 00:00:00 2001 From: FritzFlorian Date: Thu, 6 Jun 2019 15:51:12 +0200 Subject: [PATCH] Fix concurrent access to work_done flag. This should have been fine without the atomic property (as it is only a single writer and multiple readers to a single bit). Nevertheless we fixed the 'race' to remove a warning in the thread sanitizer. --- lib/pls/include/pls/internal/scheduling/scheduler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pls/include/pls/internal/scheduling/scheduler.h b/lib/pls/include/pls/internal/scheduling/scheduler.h index f55fecf..c38ae64 100644 --- a/lib/pls/include/pls/internal/scheduling/scheduler.h +++ b/lib/pls/include/pls/internal/scheduling/scheduler.h @@ -37,7 +37,7 @@ class scheduler { base::barrier sync_barrier_; task *main_thread_root_task_; - bool work_section_done_; + std::atomic work_section_done_; bool terminated_; public: -- libgit2 0.26.0