Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions sctp/src/association/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,8 @@ impl Association {
}
}
};
// Yielding here seems to provide a slight (~3%) throughput performance improvement.
tokio::task::yield_now().await;

// Make a buffer sized to what we read, then copy the data we
// read from the underlying transport. We do this because the
Expand Down Expand Up @@ -522,6 +524,11 @@ impl Association {
//log::debug!("[{}] sending {} bytes done", name, raw.len());
}

// Yielding here seems to minimize deadlock risk when both requestor and
// responder are using the same tokio runtime as in the example
// data-channel-flow-control
tokio::task::yield_now().await;

if !continue_loop {
break;
}
Expand Down