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
|
ignore-systems ignore-targets
|
||||||
inferior-memory-limit)
|
inferior-memory-limit)
|
||||||
(define utility-thread-pool
|
(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
|
(define call-with-utility-thread
|
||||||
(let ((queued-channel
|
(lambda (thunk)
|
||||||
;; There might be high demand for this, so order the requests
|
(call-with-thread
|
||||||
;; TODO This doesn't shut down
|
utility-thread-pool
|
||||||
(spawn-queueing-fiber
|
thunk)))
|
||||||
(fixed-size-thread-pool-channel utility-thread-pool))))
|
|
||||||
(lambda (thunk)
|
|
||||||
(call-with-thread
|
|
||||||
utility-thread-pool
|
|
||||||
thunk
|
|
||||||
#:channel queued-channel))))
|
|
||||||
|
|
||||||
(define (read-derivations filenames)
|
(define (read-derivations filenames)
|
||||||
(call-with-utility-thread
|
(call-with-utility-thread
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue