cdk-rsx-executor 0.1.0

Async executor for CDK RSX canisters
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! One transient dispatch switch shared by calls and the SDK timer driver.
use std::cell::Cell;

thread_local! {
    static PAUSED: Cell<bool> = const { Cell::new(false) };
}

pub fn is_paused() -> bool {
    PAUSED.get()
}

pub fn set_paused(paused: bool) -> bool {
    PAUSED.replace(paused) != paused
}