mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-25 07:17:40 +01:00
We use `tokio`'s `io-util` feature to provide the `Async{Read,Write}Ext` traits, which allow us to simply launch a read future or `poll_write` directly as well as `split` the `TcpStream` into a read/write half. However, these traits aren't actually doing much for us - they are really just wrapping the `readable` future (which we can trivially use ourselves) and `poll_write` isn't doing anything for us that `poll_write_ready` can't. Similarly, the split logic is actually just `Arc`ing the `TcpStream` and busy-waiting when an operation is busy to prevent concurrent reads/writes. However, there's no reason to prevent concurrent access at the stream level - we aren't ever concurrently writing or reading (though we may concurrently read and write, which is fine). Worse, the `io-util` feature broke MSRV (though they're likely to fix this upstream) and carries two additional dependencies (only one on the latest upstream tokio). Thus, we simply drop the dependency here. Fixes #2527. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |