From 5cefca444f7062c61cc9d118ffea5901e05186fd Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 8 Feb 2017 07:42:41 +0200 Subject: Implement parallel operation execution --- build2/scheduler.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'build2/scheduler.cxx') diff --git a/build2/scheduler.cxx b/build2/scheduler.cxx index edfa02c..244f6b8 100644 --- a/build2/scheduler.cxx +++ b/build2/scheduler.cxx @@ -84,11 +84,11 @@ namespace build2 // s.tcount = &tc; - // Since we use a mutex for synchronization, we can relax the atomic - // access. + // We could probably relax the atomic access since we use a mutex for + // synchronization though this has a different tradeoff (calling wait + // because we don't see the count). // - while (!(s.shutdown || - tc.load (std::memory_order_relaxed) <= start_count)) + while (!(s.shutdown || tc <= start_count)) s.condv.wait (l); s.waiters--; -- cgit v1.1