#7051·tokio

对于 O_DIRECT 管道,短读取优化是错误的

作者: throwable-one创建于 2024年12月29日更新于 2026年9月24日
标签C-bugA-tokioM-net
  • use tokio::process::Command; + use std::process::Command; and remove await from read: it works!!: it reads 4096 blocks till the end (just like pipe(2) suggests). Workaround: setting buffer size to 4096 helps. It seems that Tokio waits for the buffer to be full before reading.