k0001 commented on this pull request.
> +— ‘STM’ function, in FIFO order.
+— After the given continuation returns (successfully or due to some exception),
+— the worker will continue processing any pending input before returning,
+— re-throwing the continuation’s exception if any.
+— Usage of the obtained ‘STM’ action after the given continuation has returned
+— will fail with an exception.
+ :: (MonadIO m, Ex.MonadMask m)
+ => WalletActionInterp IO a
+ -> ((WalletAction a -> STM ()) -> m b)
+ -> m b
+withWalletWorker wai k = do
+ — ‘mDone’ is full if the worker finished.
+ mDone :: MVar (Either Ex.SomeException ()) <- liftIO newEmptyMVar It turns out things are better with `async`. I just submitted those changes. Thanks for the suggestion.