mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-08 00:00:13 +02:00
io: bring back split utility (#1521)
Bring back `split` utility as a free fn instead of a method on `AsyncRead`. This utility wraps the `stream` in an `Arc` and uses mutual exclusion to ensure correct access. Additionally, the specialized `split_mut` fn on TcpStream and UdsStream is promoted to `split`.
This commit is contained in:
@@ -22,6 +22,9 @@ mod async_write;
|
||||
#[cfg(feature = "util")]
|
||||
mod io;
|
||||
|
||||
#[cfg(feature = "util")]
|
||||
pub mod split;
|
||||
|
||||
pub use self::async_buf_read::AsyncBufRead;
|
||||
pub use self::async_read::AsyncRead;
|
||||
pub use self::async_write::AsyncWrite;
|
||||
|
||||
Reference in New Issue
Block a user