diff options
Diffstat (limited to 'src/libstore/build/worker.hh')
-rw-r--r-- | src/libstore/build/worker.hh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libstore/build/worker.hh b/src/libstore/build/worker.hh index bb51a2114..d6cde8384 100644 --- a/src/libstore/build/worker.hh +++ b/src/libstore/build/worker.hh @@ -167,16 +167,17 @@ private: /** * Pass current stats counters to the logger for progress bar updates. */ - void updateStatistics(); + kj::Promise<Result<void>> updateStatistics(); - bool statisticsOutdated = true; + AsyncSemaphore statisticsUpdateSignal{1}; + std::optional<AsyncSemaphore::Token> statisticsUpdateInhibitor; /** * Mark statistics as outdated, such that `updateStatistics` will be called. */ void updateStatisticsLater() { - statisticsOutdated = true; + statisticsUpdateInhibitor = {}; } kj::Promise<Result<void>> runImpl(); |