Lines Matching refs:ylong_runtime
1 # ylong_runtime chapter
10 - `Runtime`:Rust 异步运行时,为依赖它的系统服务提供 Rust 异步编程界面和任务调度能力,从功能层次上可以分为 `ylong_runtime` 和 `ylong_io` 两层:
11 - `ylong_runtime`:异步运行时的功能主体,提供了大量 Rust 标准库接口的异步化接口,同时提供了对用户任务的生命周期管理和调度等能力;
12 - `ylong_io`:依赖 `libc` 库,结合系统的 epoll 机制,实现了非阻塞 TCP 和 UDP 功能,作为 `ylong_runtime` 异步 IO 的底座;
19 `ylong_runtime`为功能主体,用户使用时直接依赖该库即可。`ylong_runtime` 依赖以下三个 crates:
22 …ylong_ffrt`:提供了 Function Flow Runtime 接口的 Rust 封装,可作为 `ylong_runtime` 的底层任务调度器。可通过 `ylong_runtime`…
23 - `ylong_macros`:实现 `ylong_runtime` 所需的过程宏,目前主要用于提供 `select!` 过程宏。可通过 `ylong_runtime` 的 feature `ma…
25 ### 图3 ylong_runtime 内部架构图
28 `ylong_runtime` 对外 API 分为四个模块:
42 …r` 的任务队列,并在合适的时机得到执行。执行过程中如遇到任务阻塞,则 `Executor` 按一定的策略选择下一个可执行的任务去执行。 `ylong_runtime` 拥有两个可互相替换的调度器:
48 ylong_runtime
60 |── ylong_runtime
61 | |── benches # ylong_runtime 性能用例
62 | |── examples # ylong_runtime 代码示例
63 | |── src # ylong_runtime 源码
83 | └── tests # ylong_runtime 测试用例
86 └── src # ylong_runtime 过程宏实现
92 1. 在 `Cargo.toml` 中引入 `ylong_runtime`
95 ylong_runtime = { git = "https://gitee.com/openharmony/commonlibrary_rust_ylong_runtime.git", featu…
99 1. 在`bundle.json`中添加`ylong_runtime`
102 "components": ["ylong_runtime"]
105 2. 在`BUILD.gn`中添加`ylong_runtime:ylong_runtime`
107 external_deps = ["ylong_runtime:ylong_runtime"]