Destroy the utility thread pool

This commit is contained in:
Christopher Baines 2025-07-08 07:25:02 +01:00
parent 401f916517
commit f279aa0071

View file

@ -2853,16 +2853,17 @@ WHERE builder != 'builtin:download'
extra-inferior-environment-variables
ignore-systems ignore-targets
inferior-memory-limit)
(define call-with-utility-thread
(let* ((thread-pool
(define utility-thread-pool
(make-fixed-size-thread-pool parallelism))
(queued-channel
(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 thread-pool))))
(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