Function a_smol_runtime

Source
pub fn a_smol_runtime()
Expand description

§通过学习 smol 建立整体异步编程概念框架

见 项目 README 图示。soml 的整体架构非常简单和清晰。

以下是关键组件。

§async-task

对 异步任务 的抽象

§async-executor

异步任务调度和执行,依赖 async-task

§async-io

对接底层I/O,并实现了 Reactor ,依赖 polling

§polling

一层轻薄的 I/O 抽象 API,支持 epoll(Linux/Android)/kqueue(macOS, iOS, FreeBSD, NetBSD, OpenBSD, DragonFly BSD)/event ports(illumos, Solaris)/wepoll(Windows)

§blocking

为异步程序隔离阻塞I/O的线程池。因为像 epoll_wait 实际还是阻塞。