aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/nar-herder.in17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/nar-herder.in b/scripts/nar-herder.in
index 03205d1..1dfbc6c 100644
--- a/scripts/nar-herder.in
+++ b/scripts/nar-herder.in
@@ -50,6 +50,7 @@
(logging port-log)
(prometheus)
(fibers)
+ (fibers scheduler)
(fibers conditions)
(fibers web server)
((guix ui) #:select (read/eval string->duration))
@@ -679,6 +680,22 @@
(lambda ()
(run-fibers
(lambda ()
+ (let* ((current (current-scheduler))
+ (schedulers
+ (cons current (scheduler-remote-peers current))))
+ (for-each
+ (lambda (i sched)
+ (spawn-fiber
+ (lambda ()
+ (catch 'system-error
+ (lambda ()
+ (set-thread-name
+ (string-append "fibers " (number->string i))))
+ (const #t)))
+ sched))
+ (iota (length schedulers))
+ schedulers))
+
(log-msg 'INFO "starting server, listening on "
(assq-ref opts 'host) ":" (assq-ref opts 'port))