Change fixed-size-thread-pool to a thread-pool
To avoid the queueing fiber.
This commit is contained in:
parent
3f837481fd
commit
a4480ac357
1 changed files with 7 additions and 11 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue