refactor(quinn): Remove some usage of execute_poll - #2232
Conversation
This commit makes there be fewer places where SendStream::execute_poll is called directly. AsyncWrite implementations now go through poll_write, and poll_write now goes through the write future. This means that execute_poll is now only called directly from write and write_chunks.
d8cc4d3 to
f6abb3a
Compare
|
Why is this better? |
It's simpler. Consider that the previous versions of these lines involve a closure, whereas the updated versions don't. The previous versions of the lines involve calling two of our custom methods ( Previously, the logic of integrating |
Ralith
left a comment
There was a problem hiding this comment.
Nice to know that poll_write isn't actually primitive, though it may make sense to keep as a discoverable convenience.
This commit makes there be fewer places where SendStream::execute_poll is called directly. AsyncWrite implementations now go through poll_write, and poll_write now goes through the write future. This means that execute_poll is now only called directly from write and write_chunks.
Note: Cherry-picked from #2231.