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

Make produce itself interruptible to work with ZIO interruption inheritance #1371

Open
neko-kai opened this issue Jan 19, 2021 · 0 comments
Open
Assignees
Labels
bug distage (di) good first issue Good for newcomers zio ZIO-specific features or interop

Comments

@neko-kai
Copy link
Member

After #1138 Lifecycle encoding itself supports interruptibility, but since the entirety of Injector#produce happens in an uninterruptible region, this causes problems with ZIO's odd interruption inheritance (gitter thread)

It seems like this can't be solved by just wrapping all ZIO's in .interruptible, because ZIO effects can come not just from ZManaged, but from Lifecycle and Resource too.

Instead, produce can be made interruptible, with individual resource acquiries being uninterruptible, as long as we setup a finalizer for contents of ProvisionMutable and as long as the region between Lifecycle being acquired and its finalizer being inserted into ProvisionMutable is uninterruptible, it would be safe to for the rest of produce to be interruptible.

@neko-kai neko-kai added bug help wanted distage (di) good first issue Good for newcomers zio ZIO-specific features or interop labels Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug distage (di) good first issue Good for newcomers zio ZIO-specific features or interop
Projects
None yet
Development

No branches or pull requests

2 participants