aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2024-05-12 23:00:14 +0100
committerChristopher Baines <mail@cbaines.net>2024-05-12 23:00:14 +0100
commitff814284f4cf046ad19dcee37f1b90df7d4b426c (patch)
tree066c429dbc2476a299a5bf46ec57857a9211a378
parent9066b6d623d4f1b34ee4b9e199590cb4ecb9718a (diff)
downloadbuild-coordinator-ff814284f4cf046ad19dcee37f1b90df7d4b426c.tar
build-coordinator-ff814284f4cf046ad19dcee37f1b90df7d4b426c.tar.gz
Make the worker thread timeout a parameter
-rw-r--r--guix-build-coordinator/utils/fibers.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/guix-build-coordinator/utils/fibers.scm b/guix-build-coordinator/utils/fibers.scm
index 82697a5..bfadadd 100644
--- a/guix-build-coordinator/utils/fibers.scm
+++ b/guix-build-coordinator/utils/fibers.scm
@@ -15,6 +15,7 @@
#:select (set-thread-name))
#:use-module (guix-build-coordinator utils)
#:export (make-worker-thread-channel
+ %worker-thread-default-timeout
call-with-worker-thread
worker-thread-timeout-error?
@@ -202,8 +203,11 @@ arguments of the worker thread procedure."
(define worker-thread-timeout-error?
(record-predicate &worker-thread-timeout))
+(define %worker-thread-default-timeout
+ (make-parameter 30))
+
(define* (call-with-worker-thread channel proc #:key duration-logger
- (timeout 30))
+ (timeout (%worker-thread-default-timeout)))
"Send PROC to the worker thread through CHANNEL. Return the result of PROC.
If already in the worker thread, call PROC immediately."
(let ((args (%worker-thread-args)))