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

Notify the Sender that the Encoder has been dropped #3

Merged
merged 1 commit into from
Jun 25, 2020

Conversation

jbr
Copy link
Member

@jbr jbr commented Jun 15, 2020

This changes the signature of Sender::send to return a Result that indicates whether the send was successful, allowing tide or other consumers to use ? to break out of a send loop.

This PR replaces pin-project-lite with pin-project in order to use pinned drop. A shared Arc<AtomicBool> is the concurrency primitive, which seemed like the simplest thing that could possibly work.

This addresses http-rs/tide#591 in conjunction with http-rs/tide#598

@jbr jbr merged commit 0aa18c0 into http-rs:master Jun 25, 2020
@yoshuawuyts yoshuawuyts mentioned this pull request Jun 27, 2020
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