yazi/yazi-proxy/src/semaphore.rs
2024-03-09 03:07:20 +08:00

11 lines
265 B
Rust

use tokio::sync::Semaphore;
use yazi_shared::RoCell;
pub static HIDER: RoCell<Semaphore> = RoCell::new();
pub static WATCHER: RoCell<Semaphore> = RoCell::new();
pub(super) fn init_semaphore() {
HIDER.init(Semaphore::new(1));
WATCHER.init(Semaphore::new(1));
}