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 output-stream::cancel and trap if dropped during active write #74

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

badeend
Copy link
Contributor

@badeend badeend commented Feb 14, 2024

This PR provides a clear answer to an outstanding issue regarding silent data loss on drop.

This change is in line with the general structured concurrency direction the component-model is heading in: https://docs.google.com/presentation/d/1bWUO1Z9swQ4KSmoeUMTwIFYurasn14xFy4o-G8nE15w/edit#slide=id.g2b22cdef62b_0_95

Whether or not this is a breaking change is up for discussion. I see it as just a clarification for both consumers and implementors. I.e. if you're affected by these new trap-on-drop semantics, you were already buggy to begin with.

@badeend
Copy link
Contributor Author

badeend commented Feb 14, 2024

FYI, the preview1 component adapter always performs a blocking flush on each write regardless of non-blocking status. So those users are already good to go.

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 this pull request may close these issues.

1 participant