Change fixed-size-thread-pool to a thread-pool

To avoid the queueing fiber.
This commit is contained in:
Christopher Baines 2025-07-09 12:54:09 +01:00
parent 3f837481fd
commit a4480ac357

View file

@ -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