Skip to content
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

chore: remove WindowUpdateMode::OnReceive #175

Closed
mxinden opened this issue Nov 23, 2023 · 1 comment · Fixed by #179
Closed

chore: remove WindowUpdateMode::OnReceive #175

mxinden opened this issue Nov 23, 2023 · 1 comment · Fixed by #179

Comments

@mxinden
Copy link
Member

mxinden commented Nov 23, 2023

I suggest we remove WindowUpdateMode::OnReceive in favor of always using (not just defaulting to) WindowUpdateMode::OnRead.

I can not think of a use-case where one would want OnReceive over OnRead. Anyone?

Removing OnReceive will simplify our codebase.

/// Specifies when window update frames are sent.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum WindowUpdateMode {
/// Send window updates as soon as a [`Stream`]'s receive window drops to 0.
///
/// This ensures that the sender can resume sending more data as soon as possible
/// but a slow reader on the receiving side may be overwhelmed, i.e. it accumulates
/// data in its buffer which may reach its limit (see `set_max_buffer_size`).
/// In this mode, window updates merely prevent head of line blocking but do not
/// effectively exercise back pressure on senders.
OnReceive,

@thomaseizinger
Copy link
Contributor

Sounds good to me!

Perhaps make a point-release deprecating it first :)

mxinden added a commit to mxinden/rust-yamux that referenced this issue Nov 23, 2023
Continuation of libp2p#120.

Preparation for libp2p#175.

Also removes dead-lock warning for `WindowUpdateMode::OnRead`. With the restructuring of
`Connection::poll`, one reads from the socket when writing is blocked. Thus the deadlock can not
occur.
mxinden added a commit to mxinden/rust-yamux that referenced this issue Nov 23, 2023
Follow up to previous deprecation libp2p#177.

Fixes libp2p#175.
mxinden added a commit that referenced this issue Nov 24, 2023
Continuation of #120.

Preparation for #175.

Also removes dead-lock warning for `WindowUpdateMode::OnRead`. With the restructuring of
`Connection::poll`, one reads from the socket when writing is blocked. Thus the deadlock can not
occur.
mxinden added a commit that referenced this issue Nov 27, 2023
Follow up to previous deprecation #177.

Fixes #175.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants