We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 91c00c5 commit d374da2Copy full SHA for d374da2
1 file changed
Control/Concurrent/Async/Internal.hs
@@ -242,7 +242,12 @@ poll = atomically . pollSTM
242
waitSTM :: Async a -> STM a
243
waitSTM a = do
244
r <- waitCatchSTM a
245
- either throwSTM return r
+ either (rethrowSTM) return r
246
+
247
+rethrowSTM e =
248
+ case fromException e of
249
+ Just (e' :: ExceptionWithContext SomeException) -> throwSTM (NoBacktrace e')
250
+ Nothing -> throwSTM e
251
252
-- | A version of 'waitCatch' that can be used inside an STM transaction.
253
--
0 commit comments