From f279aa00718efc2e5e5027531e1666e8445f86c7 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 8 Jul 2025 07:25:02 +0100 Subject: [PATCH] Destroy the utility thread pool --- .../jobs/load-new-guix-revision.scm | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/guix-data-service/jobs/load-new-guix-revision.scm b/guix-data-service/jobs/load-new-guix-revision.scm index 4cbfd21..e1700ad 100644 --- a/guix-data-service/jobs/load-new-guix-revision.scm +++ b/guix-data-service/jobs/load-new-guix-revision.scm @@ -2853,16 +2853,17 @@ WHERE builder != 'builtin:download' extra-inferior-environment-variables ignore-systems ignore-targets inferior-memory-limit) + (define utility-thread-pool + (make-fixed-size-thread-pool parallelism)) (define call-with-utility-thread - (let* ((thread-pool - (make-fixed-size-thread-pool parallelism)) - (queued-channel - ;; There might be high demand for this, so order the requests - (spawn-queueing-fiber - (fixed-size-thread-pool-channel thread-pool)))) + (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 - thread-pool + utility-thread-pool thunk #:channel queued-channel)))) @@ -2965,6 +2966,8 @@ WHERE builder != 'builtin:download' (fibers-force guix-revision-id-promise))) (destroy-parallelism-limiter read-derivations/parallelism-limiter) + (destroy-thread-pool + utility-thread-pool) (and (if (defined? 'channel-news-for-commit