diff options
author | Christopher Baines <mail@cbaines.net> | 2024-05-10 21:13:18 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2024-05-10 21:13:18 +0100 |
commit | 84be7d83ca2c557aa9fce520a7e3a316aa8f89a9 (patch) | |
tree | bcf33d20b86e5e714aac062c0fc7652bebb7ec95 /guix-build-coordinator/utils | |
parent | 527fa6c657b25f3fd9f007b1cdf5b2b5dac75d0a (diff) | |
download | build-coordinator-84be7d83ca2c557aa9fce520a7e3a316aa8f89a9.tar build-coordinator-84be7d83ca2c557aa9fce520a7e3a316aa8f89a9.tar.gz |
Fix the port timeout exceptions
Diffstat (limited to 'guix-build-coordinator/utils')
-rw-r--r-- | guix-build-coordinator/utils/fibers.scm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/guix-build-coordinator/utils/fibers.scm b/guix-build-coordinator/utils/fibers.scm index e082bf6..82697a5 100644 --- a/guix-build-coordinator/utils/fibers.scm +++ b/guix-build-coordinator/utils/fibers.scm @@ -403,7 +403,7 @@ If already in the worker thread, call PROC immediately." (define &port-timeout (make-exception-type '&port-timeout &external-error - '(port))) + '(thunk port))) (define make-port-timeout-error (record-constructor &port-timeout)) @@ -480,7 +480,7 @@ If already in the worker thread, call PROC immediately." #:key timeout (read-timeout timeout) (write-timeout timeout)) - (define (no-fibers-wait port mode timeout) + (define (no-fibers-wait thunk port mode timeout) (define poll-timeout-ms 200) ;; When the GC runs, it restarts the poll syscall, but the timeout @@ -500,8 +500,8 @@ If already in the worker thread, call PROC immediately." timeout-internal) (raise-exception (if (string=? mode "r") - (make-port-read-timeout-error port) - (make-port-write-timeout-error port))) + (make-port-read-timeout-error thunk port) + (make-port-write-timeout-error thunk port))) (loop (port-poll port mode poll-timeout-ms))) poll-value)))) @@ -517,7 +517,7 @@ If already in the worker thread, call PROC immediately." (lambda () (raise-exception (make-port-read-timeout-error thunk port)))))) - (no-fibers-wait port "r" read-timeout)))) + (no-fibers-wait thunk port "r" read-timeout)))) (current-write-waiter (lambda (port) (if (current-scheduler) @@ -529,7 +529,7 @@ If already in the worker thread, call PROC immediately." (lambda () (raise-exception (make-port-write-timeout-error thunk port)))))) - (no-fibers-wait port "w" write-timeout))))) + (no-fibers-wait thunk port "w" write-timeout))))) (thunk))) ;; Use the fibers sleep |