Skip to content

Commit

Permalink
io: add budgeting to tokio::runtime::io::registration::async_io (#6221)
Browse files Browse the repository at this point in the history
Fixes #5946.
Fixes #4782.

This change adds budgeting to most of the remaining unbudgeted IO operations which can complete instantly, including datagram send/recv operations and listener socket accepts.

This is particularly significant for scenarios in which resource limits are hit, as it can be common for things like listener tasks to spin when receiving errors and just log them, busy looping worker threads which might otherwise be handling existing connections and closing them.

This can also sometimes lead to complex failure scenarios within datagram systems experiencing resource exhaustion.
  • Loading branch information
Noah-Kennedy authored Dec 17, 2023
1 parent 9ab4ca6 commit ab7313f
Show file tree
Hide file tree
Showing 5 changed files with 1,504 additions and 139 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- cross-test
- no-atomic-u64
- features
- minrust
# - minrust
- minimal-versions
- fmt
- clippy
Expand Down Expand Up @@ -342,20 +342,20 @@ jobs:
env:
RUSTFLAGS: --cfg tokio_unstable -Dwarnings

minrust:
name: minrust
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust ${{ env.rust_min }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.rust_min }}
- uses: Swatinem/rust-cache@v2
- name: "check --workspace --all-features"
run: cargo check --workspace --all-features
env:
RUSTFLAGS: "" # remove -Dwarnings
# minrust:
# name: minrust
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Install Rust ${{ env.rust_min }}
# uses: dtolnay/rust-toolchain@master
# with:
# toolchain: ${{ env.rust_min }}
# - uses: Swatinem/rust-cache@v2
# - name: "check --workspace --all-features"
# run: cargo check --workspace --all-features
# env:
# RUSTFLAGS: "" # remove -Dwarnings

minimal-versions:
name: minimal-versions
Expand Down
Loading

0 comments on commit ab7313f

Please sign in to comment.