-
Notifications
You must be signed in to change notification settings - Fork 65
What should happen if a canceler throws #110
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
Comments
Right now, if a canceler throws in an Alt, the entire Alt will throw. |
I think the failure to cancel an already completed result should not affect a branch of the |
I think that's right. I did that for |
I don't think so. It would be nice to have a soft guarantee that
There is an unresolved question (both here and in the Scala work I'm doing) of how to handle errors with no obvious output. Cancelers are one point (if semantics are changed as noted) but finalizers are another. Finalizers must always be run, inner to outer, even if inner finalizers fail. Now these errors disappear into a black hole. Javascript has |
Yes that's the idea. I don't want to swallow errors, and JS runtimes at least have a global handler to observe exceptions like this. It's possible we could add our own thing as well, but I don't really want to do that unless we find it's really necessary. |
Fixes purescript-contrib#110 Fixes purescript-contrib#113 This handles bracket/catch within finalizers by tagging all items in the attempt stack with the interrupt status. When we go to evaluate them we can then compare if the interrupt status has changed and whether we should filter it out or run it.
For example, with the Alt instance, if a thread succeeds, but in the process of killing the other threads, one of them throws, should the entire Alt throw? Or should we throw the error in a fresh stack and continue with a success?
The text was updated successfully, but these errors were encountered: