知识卡片
mio抽象套接字就绪
mio 提供注册 I/O 源、等待可读和可写通知的设施,把 OS 差异收进较薄接口。应用需要自己关联事件和连接状态。Tokio 等运行时可把同类事件转换成 Waker 通知,使应用能以 Future 等待。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Chapter 4. Integrating Networking into Our Own Async Runtime mio 提供的 OS 就绪抽象 · 查看原书依据
When it comes to implementing async functionality with sockets, we cannot really get any lower than mio (metal I/O) without directly calling the OS. This low-level, nonblocking I/O library in Rust provides the building blocks for creating high-performance async applications. It acts as a thin abstraction over the OS’s asynchronous I/O capabilities.
参考来源
- 位置:《Async Rust Unleashing the Power of Fearless Concurrency (Maxwell Flitton, Caroline Morton)》第04章《Chapter 4. Integrating Networking into Our Own Async Runtime》,mio 提供的 OS 就绪抽象(来源项目 book-source,extracted/Async Rust Unleashing the Power of Fearless Concurrency (Maxwell Flitton, Caroline Morton)/_epub-src/OEBPS/ch04.html#id83)
- 结论依据:原书用 mio 的就绪接口对照更高层的 Tokio 和 hyper。
- 原始内容:When it comes to implementing async functionality with sockets, we cannot really get any lower than mio (metal I/O) without directly calling the OS. This low-level, nonblocking I/O library in Rust provides the building blocks for creating high-performance async applications. It acts as a thin abstraction over the OS’s asynchronous I/O capabilities.