Make it possible to increase the number of thread pool threads

And double the default to 16.
This commit is contained in:
Christopher Baines 2022-10-02 15:08:18 +01:00
parent ce2e13aa45
commit ff77bbea7e
2 changed files with 19 additions and 3 deletions

View file

@ -33,6 +33,7 @@
(system repl repl)
(gcrypt pk-crypto)
(guix pki)
(guix-data-service utils)
(guix-data-service config)
(guix-data-service database)
(guix-data-service substitutes)
@ -91,6 +92,12 @@
(alist-cons 'host
arg
(alist-delete 'host result))))
(option '("thread-pool-threads") #t #f
(lambda (opt name arg result)
(alist-cons 'thread-pool-threads
(string->number arg)
(alist-delete 'thread-pool-threads
result))))
(option '("postgresql-statement-timeout") #t #f
(lambda (opt name arg result)
(alist-cons 'postgresql-statement-timeout
@ -111,6 +118,7 @@
(_ #t)))
(port . 8765)
(host . "0.0.0.0")
(thread-pool-threads . 16)
(postgresql-statement-timeout . 60000)))
@ -171,7 +179,10 @@
(current-error-port))
#f)))
(%show-error-details
(assoc-ref opts 'show-error-details)))
(assoc-ref opts 'show-error-details))
(%thread-pool-threads
(assoc-ref opts 'thread-pool-threads)))
(let* ((startup-completed
(make-atomic-box