From ff814284f4cf046ad19dcee37f1b90df7d4b426c Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sun, 12 May 2024 23:00:14 +0100 Subject: Make the worker thread timeout a parameter --- guix-build-coordinator/utils/fibers.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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))) -- cgit v1.2.3