async-oneshot:快速,小型,功能齐全,无标准的oneshot频道

时间:2021-03-09 17:30:55
【文件属性】:
文件名称:async-oneshot:快速,小型,功能齐全,无标准的oneshot频道
文件大小:14KB
文件格式:ZIP
更新时间:2021-03-09 17:30:55
async concurrency channels async-await futures 异步一次 快速,小型,功能齐全,可感知异步的oneshot通道。 特征: 快速燃烧! 请参阅下面的“ Performance部分。 微小的代码,只有一个依赖关系和一个闪电般的快速构建。 完整的no_std支持(带有Arc alloc )。 独特功能:发送方可以等待接收方等待。 用法 #[test] fn success_one_thread () { let (s,r) = oneshot :: < bool>(); assert_eq! ((), s. send ( true ). unwrap ()); assert_eq! ( Ok ( true ), future :: block_on (r)); } 表现 async-oneshot带有一个基准套件,您可以将其与cargo bench运行。 所有工作台都是单线程的,在我的机器上花费两位数纳
【文件预览】:
async-oneshot-main
----.gitignore(19B)
----README.md(4KB)
----Cargo.toml(704B)
----tests()
--------test.rs(2KB)
----LICENSE(16KB)
----src()
--------lib.rs(919B)
--------sender.rs(2KB)
--------inner.rs(4KB)
--------receiver.rs(2KB)
----benches()
--------oneshot.rs(3KB)
----Makefile(893B)

网友评论