From a4480ac3572b433c0eb20265b066818ee74773c4 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Wed, 9 Jul 2025 12:54:09 +0100 Subject: [PATCH] Change fixed-size-thread-pool to a thread-pool To avoid the queueing fiber. --- .../jobs/load-new-guix-revision.scm | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/guix-data-service/jobs/load-new-guix-revision.scm b/guix-data-service/jobs/load-new-guix-revision.scm index fce416c..2272647 100644 --- a/guix-data-service/jobs/load-new-guix-revision.scm +++ b/guix-data-service/jobs/load-new-guix-revision.scm @@ -2921,18 +2921,14 @@ WHERE builder != 'builtin:download' ignore-systems ignore-targets inferior-memory-limit) (define utility-thread-pool - (make-fixed-size-thread-pool parallelism)) + ;; Use a thread pool rather than a fixed size thread pool, since this + ;; takes care of queuing waiters + (make-thread-pool parallelism)) (define call-with-utility-thread - (let ((queued-channel - ;; There might be high demand for this, so order the requests - ;; TODO This doesn't shut down - (spawn-queueing-fiber - (fixed-size-thread-pool-channel utility-thread-pool)))) - (lambda (thunk) - (call-with-thread - utility-thread-pool - thunk - #:channel queued-channel)))) + (lambda (thunk) + (call-with-thread + utility-thread-pool + thunk))) (define (read-derivations filenames) (call-with-utility-thread