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

Add ConcurrentEffect instance that auto-catches defects #277

Open
neko-kai opened this issue Jan 8, 2021 · 0 comments
Open

Add ConcurrentEffect instance that auto-catches defects #277

neko-kai opened this issue Jan 8, 2021 · 0 comments

Comments

@neko-kai
Copy link
Member

neko-kai commented Jan 8, 2021

Such an instance would be useful for compatibility with existing TF code that uses throw/catch outside of Sync#delay/Async#async where their behavior is undefined and left to the implementation, the default ZIO implementation of cats-effect typeclasses chooses to capture such exceptions as defects, which makes them unrecoverable with cats-effect's own methods.

This should be a separate instance, for example accessible at import zio.interop.catz.autocatch._

Care must be taken to suspend all places where potential defects may appear - that is at least all by-name parameters, ideally all super-class methods should be overriden to ensure that nothing is missed.

/cc @a14e

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

No branches or pull requests

1 participant