(zilch magic): configurable CA build job count
Change-Id: I6a6a6964f157a33b35dae7245c344be7907c5221
This commit is contained in:
parent
dc7487b9e2
commit
db3b2316f0
2 changed files with 12 additions and 8 deletions
|
|
@ -23,7 +23,7 @@
|
|||
store-path-realised store-path-open
|
||||
store-path-devirtualise
|
||||
|
||||
drv-resolve-ca
|
||||
ca-thread-count drv-resolve-ca
|
||||
|
||||
zilch-magic-counters)
|
||||
|
||||
|
|
@ -333,6 +333,8 @@
|
|||
(define-record-printer (<pending-item> item out)
|
||||
(fprintf out "#<pending-item ~A - awaiting ~S>" (derivation-path (pending-item-ca-drv item)) (pending-item-awaiting-count item)))
|
||||
|
||||
(define ca-thread-count (make-parameter 4))
|
||||
|
||||
(define (rewrite-ca-stack input-drv)
|
||||
; A mapping of CA derivation path to <pending-item>.
|
||||
(define ca-to-pending-map (mapping (make-default-comparator)))
|
||||
|
|
@ -478,7 +480,7 @@
|
|||
(builder quit conn))))))
|
||||
|
||||
(define builder-threads '())
|
||||
(do ((i 0 (+ i 1))) ((>= i 16) #f)
|
||||
(do ((i 0 (+ i 1))) ((>= i (ca-thread-count)) #f)
|
||||
(set! builder-threads
|
||||
(cons
|
||||
(thread-start!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue