diff options
author | Christopher Baines <mail@cbaines.net> | 2024-01-18 14:40:05 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2024-01-18 14:41:32 +0000 |
commit | 46b4c87e92a1470198e6c9c6cb1d7e3556f3a3a7 (patch) | |
tree | 32be06474fb328f3d1e42310f87aad04b11ed977 /guix-data-service | |
parent | 5af6233e5b411d1735f704d311ee46c0eec8ab6f (diff) | |
download | data-service-46b4c87e92a1470198e6c9c6cb1d7e3556f3a3a7.tar data-service-46b4c87e92a1470198e6c9c6cb1d7e3556f3a3a7.tar.gz |
Show backtraces when using parallel fibers and resource pools
Diffstat (limited to 'guix-data-service')
-rw-r--r-- | guix-data-service/utils.scm | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/guix-data-service/utils.scm b/guix-data-service/utils.scm index e1c6d84..09f47f8 100644 --- a/guix-data-service/utils.scm +++ b/guix-data-service/utils.scm @@ -387,7 +387,11 @@ available. Return the resource once PROC has returned." (lambda () (call-with-values (lambda () - (proc resource)) + (with-throw-handler #t + (lambda () + (proc resource)) + (lambda _ + (backtrace)))) (lambda vals (put-message pool `(return ,resource)) (apply values vals)))) @@ -433,7 +437,12 @@ available. Return the resource once PROC has returned." (lambda (exn) (put-message reply (cons 'exception exn))) (lambda () - (call-with-values thunk + (call-with-values + (lambda () + (with-throw-handler #t + thunk + (lambda _ + (backtrace)))) (lambda vals (put-message reply vals)))) #:unwind? #t)) |