kithara-platform 0.0.1-alpha5

Cross-platform primitives (sync, time, thread) for native and wasm32.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
struct Reset;

impl Drop for Reset {
    fn drop(&mut self) {
        crate::flash::reset();
    }
}

pub fn model<F>(f: F)
where
    F: Fn() + Send + Sync + 'static,
{
    crate::loom::model(move || {
        crate::flash::reset();
        let _reset = Reset;
        f();
    });
}