h3 icon indicating copy to clipboard operation
h3 copied to clipboard

Drop AsyncWrite usage in h3-quinn once GATs land

Open stammw opened this issue 3 years ago • 2 comments

We were forced to use AsyncWrite in h3_quinn::SendStream because Quinn only offers lifetime-bound Futures to poll for writes: Write<'a, S>.

Generic associated type could cancel this limitation, allowing to store them into h3_quinn::SendStream.

This will have positive implication for performance and will remove the necessity to Pin the stream and to downcast the error type from IOError to quinn::WriteError.

stammw avatar Sep 30 '21 10:09 stammw

quinn could also be modified to expose raw poll_* style methods alongside important futures, if a better approach is required in the mean time. That's assuming it's not practical to modify h3 to push the pinning/lifetime issues downstream.

Ralith avatar Jan 01 '22 21:01 Ralith

I remember that I thought of using the poll_* methods, but can't recall why I didn't ask for them to be made available. I guess this solution will cancel the need of GATs whatsoever.

stammw avatar Jan 03 '22 07:01 stammw

This should be closed after quinn 0.9.0 upgrade.

inflation avatar Apr 14 '23 02:04 inflation