-
Notifications
You must be signed in to change notification settings - Fork 87
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
Upgrade quinn
to 0.9.0 for h3-quinn
#144
Comments
Mind if I take this? |
@eagr Go ahead |
I recently came to this realization of how we can wrap An example is tokio_util::sync::PollSender. In short, you have an let rx = self.rx.take().unwrap();
self.recv_stream_fut.set(async move {
let stream = rx.recv_stream().await;
(rx, stream)
}); Once you've polled that future, and gotten the quinn struct and the stream back, you put the struct back into the option, and tada. you have a poll fn. The h3-quinn crate could have this pattern, in order to implement the |
Passing ownership into an aysnc block like that is the approach we recommend, yeah; e.g. the libp2p folks have had some success with it. Other Quinn users have used e.g. |
With the new release of
quinn
, the APIs are more unified towards a future-based interface. #55 would be a non-issue since the new release has an asyncwrite
function directly.Note that all futures returned by
quinn
are requiring a lifetime now, storing them may not be an option.The text was updated successfully, but these errors were encountered: