You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Factor out a BufferedInputStream and impl AsyncRead for it #23
Right now we directly call input-stream.read in three places:
impl AsyncRead for TcpStream
impl AsyncRead for &TcpStream
impl AsyncRead for IncomingBody
In the first two impls we don't buffer and drop whatever doesn't fit into the buffer the user passed onto the floor.
In IncomingBody, a buffer is maintained for whatever the user doesn't take.
We should factor that buffer into a single BufferedInputStream in io::read, and reuse it in tcp and http.
Additionally, we can cache the Pollable for a given InputStream (as long as the fields are ordered so it gets dropped before its parent!) so we aren't subscribing and dropping that resource every time we wait for more input.
Activity
pchickey commentedon Dec 28, 2024
Common AsyncInputStream introduced in #37. Need a BufReader / BufWriter to add buffering still.