Don't silently swallow errors in linked-thread

This commit is contained in:
Tony Garnock-Jones 2021-06-08 16:37:40 +02:00
parent 2276d1a81e
commit 5c2bdb1e93
1 changed files with 9 additions and 1 deletions

View File

@ -5,6 +5,7 @@
(provide linked-thread)
(require "engine.rkt")
(require (only-in racket/exn exn->string))
(define-logger syndicate/driver-support)
@ -36,5 +37,12 @@
peer
(embedded
(thread (lambda ()
(with-handlers ([(lambda (_e) #t) (lambda (_e) (void))]) (thunk))
(with-handlers
([(lambda (_e) #t)
(lambda (e)
(log-syndicate/driver-support-error "~a crashed:\n~a"
name
(exn->string e))
(void))])
(thunk))
(turn-freshen this-turn !)))))))))