Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async exception safety? #31

Open
merijn opened this issue Jan 23, 2018 · 2 comments · May be fixed by #37
Open

Async exception safety? #31

merijn opened this issue Jan 23, 2018 · 2 comments · May be fixed by #37

Comments

@merijn
Copy link

merijn commented Jan 23, 2018

As far as I can tell, the handlers for resource cleanup handle in a regular mask, rather than an uninterruptibleMask. This means the handler can get interrupted and aborted midway if cleanup performs a blocking operation and an async exception arrives during this time. Perhaps resource cleanup should run in uninterruptibleMask? Alternatively, this problem should be documented on the page, so users can take relevant precautions themselves.

@mitchellwrosen
Copy link

https://hackage.haskell.org/package/safe-exceptions is available, recently reimplemented by https://hackage.haskell.org/package/unliftio.

I'd like to see this package to move from MonadBaseControl to MonadUnliftIO if possible. I'm happy to provide a patch if the maintainers agree!

@brandon-leapyear
Copy link

brandon-leapyear commented Nov 22, 2020

This is an old work account. Please reference @brandonchinn178 for all future communication


Bump. Would be great to use MonadUnliftIO instead of MonadBaseControl.

cc @bos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants