Skip to content

Detect connection closed on endpoint with spawned task? #3037

Answered by jplatte
robert-sjoblom asked this question in Q&A
Discussion options

You must be logged in to vote

What's the actual problem with calling poll_until_ready without a separate async task? If you definitely need the channel, how about using futures::future::join(poll_until_ready(value, tx), wait_for_completion(rx).await) (or maybe try_join)?

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@robert-sjoblom
Comment options

Comment options

You must be logged in to vote
1 reply
@robert-sjoblom
Comment options

Answer selected by robert-sjoblom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants