Skip to content

Notify the Sender that the Encoder has been dropped#3

Merged
jbr merged 1 commit intohttp-rs:masterfrom
jbr:handle-dropped-encoder
Jun 25, 2020
Merged

Notify the Sender that the Encoder has been dropped#3
jbr merged 1 commit intohttp-rs:masterfrom
jbr:handle-dropped-encoder

Conversation

@jbr
Copy link
Copy Markdown
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 force-pushed the handle-dropped-encoder branch from 4a86282 to d2f1aa6 Compare June 15, 2020 04:15
@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