Ensure that chaos is stopped on exceptions

This commit is contained in:
Jay McCarthy 2019-08-06 16:31:48 -04:00
parent 93edd8a8b1
commit e5cd1f303f
1 changed files with 1 additions and 2 deletions

View File

@ -84,8 +84,7 @@
(define (call-with-chaos c t) (define (call-with-chaos c t)
(chaos-start! c) (chaos-start! c)
(parameterize ([current-chaos c]) (parameterize ([current-chaos c])
(begin0 (t) (dynamic-wind void t (λ () (chaos-stop! c)))))
(chaos-stop! c))))
(define (fiat-lux w) (define (fiat-lux w)
(define c (current-chaos)) (define c (current-chaos))