2 个不稳定版本
0.2.1 | 2022年4月29日 |
---|---|
0.2.0 |
|
0.1.0 | 2022年4月28日 |
#1068 in 并发
9KB
181 行
semaphorus
此 crate 为 Rust 添加了同步信号量。
这与 semaphore
crate 不同,因为
semaphorus
支持#![no_std]
semaphorus
在内部不使用Arc
,其行为更像RwLock<T>
,这要求信号量在多线程中位于Arc
中,因为它们没有实现克隆
lib.rs
:
semaphorus
添加了一个 Semaphore
类型,其行为类似于 RwLock