about summary refs log tree commit diff
path: root/third_party/nix/src/libutil/thread-pool.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libutil/thread-pool.cc')
-rw-r--r--third_party/nix/src/libutil/thread-pool.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/third_party/nix/src/libutil/thread-pool.cc b/third_party/nix/src/libutil/thread-pool.cc
index a16f4c2b6033..d0042c6df195 100644
--- a/third_party/nix/src/libutil/thread-pool.cc
+++ b/third_party/nix/src/libutil/thread-pool.cc
@@ -50,8 +50,9 @@ void ThreadPool::enqueue(const work_t& t) {
   state->pending.push(t);
   /* Note: process() also executes items, so count it as a worker. */
   if (state->pending.size() > state->workers.size() + 1 &&
-      state->workers.size() + 1 < maxThreads)
+      state->workers.size() + 1 < maxThreads) {
     state->workers.emplace_back(&ThreadPool::doWork, this, false);
+  }
   work.notify_one();
 }
 
@@ -111,8 +112,9 @@ void ThreadPool::doWork(bool mainThread) {
               std::rethrow_exception(exc);
             } catch (std::exception& e) {
               if (!dynamic_cast<Interrupted*>(&e) &&
-                  !dynamic_cast<ThreadPoolShutDown*>(&e))
+                  !dynamic_cast<ThreadPoolShutDown*>(&e)) {
                 ignoreException();
+              }
             } catch (...) {
             }
           }