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
Currently, we lock the receive buffer when reading from the network. However, this means that if we're reading a large message, the receiving stream can't read anything already in the buffer.
A simple solution would be to allocate a temporary buffer for reading from the network, then copy into the receive buffer. However, that's an extra copy.
Instead, I'd prefer keep a read offset and a write offset into the same buffer, updating them after reading/writing. Critically, we wouldn't hold the lock while reading.
The text was updated successfully, but these errors were encountered:
Currently, we lock the receive buffer when reading from the network. However, this means that if we're reading a large message, the receiving stream can't read anything already in the buffer.
A simple solution would be to allocate a temporary buffer for reading from the network, then copy into the receive buffer. However, that's an extra copy.
Instead, I'd prefer keep a read offset and a write offset into the same buffer, updating them after reading/writing. Critically, we wouldn't hold the lock while reading.
The text was updated successfully, but these errors were encountered: