Skip to content

io: add tokio_util::io::simplex - #7565

Merged
ADD-SP merged 36 commits into
tokio-rs:masterfrom
ADD-SP:add_sp/io-alt-simplex
Dec 18, 2025
Merged

io: add tokio_util::io::simplex#7565
ADD-SP merged 36 commits into
tokio-rs:masterfrom
ADD-SP:add_sp/io-alt-simplex

Conversation

@ADD-SP

@ADD-SP ADD-SP commented Aug 31, 2025

Copy link
Copy Markdown
Member

Design document

https://gist.github.com/ADD-SP/7558ef3965f18ce1d721dff675d01d9b

Why not deprecate the tokio::io::simplex now?

Since the deprecation is not urgent, we can release this feature and first, and the deprecate the tokio::io::simplex after several months.

issue: #7548

@ADD-SP ADD-SP added C-enhancement Category: A PR with an enhancement or bugfix. A-tokio-util Area: The tokio-util crate M-io Module: tokio/io labels Aug 31, 2025
@ADD-SP
ADD-SP force-pushed the add_sp/io-alt-simplex branch 3 times, most recently from ee6ae5a to c8a39fb Compare August 31, 2025 03:45
Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
@ADD-SP
ADD-SP force-pushed the add_sp/io-alt-simplex branch from c8a39fb to 43805ab Compare August 31, 2025 04:48
Comment thread tokio-util/Cargo.toml Outdated
Comment thread tokio-util/src/io/simplex.rs Outdated
Comment thread tokio-util/src/io/simplex.rs Outdated
Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
Comment thread tokio-util/src/io/simplex.rs
Comment thread tokio-util/src/io/simplex.rs Outdated
Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
@ADD-SP
ADD-SP requested review from Darksonn and martin-g November 5, 2025 12:26
Comment thread tokio-util/src/io/simplex.rs
Comment thread tokio-util/src/io/simplex.rs Outdated
Comment thread tokio-util/tests/io_simplex.rs
Comment thread tokio-util/tests/io_simplex.rs Outdated
Comment thread tokio-util/tests/io_simplex.rs
Comment thread tokio-util/src/io/simplex.rs
Comment thread tokio-util/src/io/simplex.rs
@martin-g

martin-g commented Nov 5, 2025

Copy link
Copy Markdown
Member

Both the issue and the implementation (this PR) do not say anything about vectored writes (https://docs.rs/tokio/1.48.0/src/tokio/io/util/mem.rs.html#387-400)
Are they omitted intentionally ?

1. The `Sender` should not hang forever when the input buf is empty
2. The `Receiver` should not hange forever when the input buf is full

Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
@ADD-SP
ADD-SP requested a review from martin-g November 5, 2025 15:25
Comment thread tokio-util/src/io/simplex.rs
Comment thread tokio-util/src/io/simplex.rs Outdated
Comment thread tokio-util/src/io/simplex.rs
Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
@github-actions github-actions Bot added the R-loom-util Run loom tokio-util tests on this PR label Nov 6, 2025
Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
Comment thread tokio-util/src/io/simplex.rs
Comment thread tokio-util/src/io/simplex.rs Outdated
Comment thread tokio-util/src/io/simplex.rs Outdated
@ADD-SP
ADD-SP requested a review from Darksonn November 20, 2025 01:55
@ADD-SP
ADD-SP merged commit 064181f into tokio-rs:master Dec 18, 2025
88 checks passed
@ADD-SP
ADD-SP deleted the add_sp/io-alt-simplex branch December 18, 2025 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-tokio-util Area: The tokio-util crate C-enhancement Category: A PR with an enhancement or bugfix. M-io Module: tokio/io R-loom-util Run loom tokio-util tests on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants