aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/web/server.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix-data-service/web/server.scm')
-rw-r--r--guix-data-service/web/server.scm24
1 files changed, 17 insertions, 7 deletions
diff --git a/guix-data-service/web/server.scm b/guix-data-service/web/server.scm
index 07f05f8..d56066e 100644
--- a/guix-data-service/web/server.scm
+++ b/guix-data-service/web/server.scm
@@ -134,11 +134,21 @@
(run-fibers
(lambda ()
- (catch 'system-error
- (lambda ()
- (set-thread-name
- (string-append "server")))
- (const #t))
+ (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 "server " (number->string i))))
+ (const #t)))
+ sched))
+ (iota (length schedulers))
+ schedulers))
(while (not request-scheduler)
(sleep 0.1))
@@ -236,6 +246,6 @@ port. Also, the port used can be changed by passing the --port option.\n"
(spawn-port-monitoring-fiber port finished?)
(wait finished?))
- #:hz 5
- #:parallelism 1))
+ #:hz 0
+ #:parallelism 2))
finished?)))