Show backtraces when using parallel fibers and resource pools

This commit is contained in:
Christopher Baines 2024-01-18 14:40:05 +00:00
parent 5af6233e5b
commit 46b4c87e92

View file

@ -387,7 +387,11 @@ available. Return the resource once PROC has returned."
(lambda () (lambda ()
(call-with-values (call-with-values
(lambda () (lambda ()
(proc resource)) (with-throw-handler #t
(lambda ()
(proc resource))
(lambda _
(backtrace))))
(lambda vals (lambda vals
(put-message pool `(return ,resource)) (put-message pool `(return ,resource))
(apply values vals)))) (apply values vals))))
@ -433,7 +437,12 @@ available. Return the resource once PROC has returned."
(lambda (exn) (lambda (exn)
(put-message reply (cons 'exception exn))) (put-message reply (cons 'exception exn)))
(lambda () (lambda ()
(call-with-values thunk (call-with-values
(lambda ()
(with-throw-handler #t
thunk
(lambda _
(backtrace))))
(lambda vals (lambda vals
(put-message reply vals)))) (put-message reply vals))))
#:unwind? #t)) #:unwind? #t))