diff options
author | Christopher Baines <mail@cbaines.net> | 2023-03-29 10:38:54 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-03-29 10:38:54 +0100 |
commit | b9f2e90a71555df2da79ba5cff0fa077c4221e65 (patch) | |
tree | 33c63a2120415b48bd6029f6bc09e6454648fa07 | |
parent | 9d875a4f4fdc8c4a40983038a78512203d4924e0 (diff) | |
download | build-coordinator-b9f2e90a71555df2da79ba5cff0fa077c4221e65.tar build-coordinator-b9f2e90a71555df2da79ba5cff0fa077c4221e65.tar.gz |
Always keep one thread running to process hooks
This should reduce the need to keep stopping and starting threads.
-rw-r--r-- | guix-build-coordinator/coordinator.scm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/guix-build-coordinator/coordinator.scm b/guix-build-coordinator/coordinator.scm index 6741446..5d4316a 100644 --- a/guix-build-coordinator/coordinator.scm +++ b/guix-build-coordinator/coordinator.scm @@ -1076,11 +1076,13 @@ (let-values (((pool-mutex job-available count-threads list-jobs) (create-thread-pool (lambda () - (length - (datastore-list-unprocessed-hook-events - datastore - event-name - thread-count))) + (max + 1 + (length + (datastore-list-unprocessed-hook-events + datastore + event-name + thread-count)))) (lambda (running-jobs) (let* ((in-progress-ids (map car running-jobs)) |