aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator
diff options
context:
space:
mode:
Diffstat (limited to 'guix-build-coordinator')
-rw-r--r--guix-build-coordinator/utils/fibers.scm17
1 files changed, 11 insertions, 6 deletions
diff --git a/guix-build-coordinator/utils/fibers.scm b/guix-build-coordinator/utils/fibers.scm
index 47ae072..8aef7cc 100644
--- a/guix-build-coordinator/utils/fibers.scm
+++ b/guix-build-coordinator/utils/fibers.scm
@@ -18,7 +18,8 @@
#:key (parallelism 1)
(delay-logger (lambda _ #f))
destructor
- lifetime)
+ lifetime
+ (log-exception? (const #t)))
"Return a channel used to offload work to a dedicated thread. ARGS are the
arguments of the worker thread procedure."
(parameterize (((@@ (fibers internal) current-fiber) #f))
@@ -58,11 +59,15 @@ arguments of the worker thread procedure."
start-time)
internal-time-units-per-second)
vals))))
- (lambda (key . args)
- (simple-format
- (current-error-port)
- "worker-thread: exception: ~A ~A\n" key args)
- (backtrace))))
+ (lambda args
+ (when (match args
+ (('%exception exn)
+ (log-exception? exn))
+ (_ #t))
+ (simple-format
+ (current-error-port)
+ "worker-thread: exception: ~A\n" args)
+ (backtrace)))))
#:unwind? #t))))))
(if (number? current-lifetime)
(unless (< current-lifetime 0)