dope-runtime 0.35.1

Thread-per-core execution and process lifecycle for dope
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use o3::base::time::Positive;

/// Main-process notification performed after every required worker is ready.
pub trait Notify {
    type Error;
    type Heartbeat: Heartbeat<Self::Error>;

    fn ready(self) -> Result<Self::Heartbeat, Self::Error>;
}

/// Explicit steady-state watch owned by the process manager.
pub trait Heartbeat<E> {
    fn period(&self) -> Positive;
    fn pulse(&self) -> Result<(), E>;

    fn draining(&self) -> Result<(), E>;
}