diff options
Diffstat (limited to 'src/nix')
-rw-r--r-- | src/nix/progress-bar.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nix/progress-bar.cc b/src/nix/progress-bar.cc index 40b905ba3243..8093d8761c4d 100644 --- a/src/nix/progress-bar.cc +++ b/src/nix/progress-bar.cc @@ -75,9 +75,10 @@ public: updateThread = std::thread([&]() { auto state(state_.lock()); while (state->active) { - state.wait(updateCV); + auto r = state.wait_for(updateCV, std::chrono::seconds(1)); draw(*state); - state.wait_for(quitCV, std::chrono::milliseconds(50)); + if (r == std::cv_status::no_timeout) + state.wait_for(quitCV, std::chrono::milliseconds(50)); } }); } |