Ensure ev/gather fibers are fully canceled on error.

This commit is contained in:
Christopher Chambers
2023-06-04 10:49:30 -04:00
parent c4c86f8671
commit 53447e9d0b
2 changed files with 14 additions and 3 deletions
+7
View File
@@ -168,6 +168,13 @@
(assert (deep= @[] (ev/gather)) "ev/gather 2")
(assert-error "ev/gather 3" (ev/gather 1 2 (error 3)))
(var cancel-counter 0)
(assert-error "ev/gather 4.1" (ev/gather
(defer (++ cancel-counter) (ev/take (ev/chan)))
(defer (++ cancel-counter) (ev/take (ev/chan)))
(error :oops)))
(assert (= cancel-counter 2) "ev/gather 4.2")
# Net testing
# 2904c19ed
(repeat 10