diff options
-rw-r--r-- | guix-build-coordinator/utils.scm | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/guix-build-coordinator/utils.scm b/guix-build-coordinator/utils.scm index f35e9f1..101a246 100644 --- a/guix-build-coordinator/utils.scm +++ b/guix-build-coordinator/utils.scm @@ -733,20 +733,13 @@ References: ~a~%" (+ 9 (time-second (current-time)))) ;; Another thread could have taken the job in the ;; mean time - (begin - (if (q-empty? queue) - (unlock-mutex queue-mutex) - ;; thread-process-job will unlock queue-mutex - (thread-process-job thread-index)) - (loop)) - (if (too-many-threads?) - (stop-thread) - (begin - (unlock-mutex queue-mutex) - (loop)))) - (begin - (thread-process-job thread-index) - (loop)))))))) + (if (q-empty? queue) + (unlock-mutex queue-mutex) + ;; thread-process-job will unlock queue-mutex + (thread-process-job thread-index)) + (unlock-mutex queue-mutex)) + (thread-process-job thread-index))) + (loop))))) (define start-new-threads-if-necessary (let ((previous-thread-started-at (make-time time-monotonic 0 0))) |