Skip to content

Commit

Permalink
Unwind on exception in event loop
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisVine committed Nov 17, 2021
1 parent e44794c commit c1468c8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions a-sync/event-loop.scm
Original file line number Diff line number Diff line change
Expand Up @@ -515,8 +515,10 @@
;; now reset the operating mode when not closed
(when (not (eq? mode 'closed))
(_mode-set! el #f)))))
;; as the handler always rethrows, we do not need to unwind here
#:unwind? #f))
;; as the exception handler locks the event loop mutex for
;; house-keeping, unwind the stack to ensure that any with-mutex
;; forms have unlocked by the time we enter the handler
#:unwind? #t))

;; This procedure is only called in the event loop thread, by
;; event-loop-run! It must be called while holding the event loop
Expand Down

0 comments on commit c1468c8

Please sign in to comment.