Skip to main content

TaskwdMonitor

Trait TaskwdMonitor 

Source
pub trait TaskwdMonitor: Send + Sync {
    // Provided methods
    fn insert(&self, task: &TaskInfo) { ... }
    fn notify(&self, task: &TaskInfo, suspended: bool) { ... }
    fn remove(&self, task: &TaskInfo) { ... }
}
Expand description

Something watching every task, rather than one — C’s taskwdMonitor (taskwd.h:41-45). Every method is optional there (a NULL slot is skipped), so every method here has a do-nothing default.

Called from the registering task’s thread (insert, remove) or the watchdog thread (notify), always with no watchdog lock held, so a monitor may call back into this module.

Provided Methods§

Source

fn insert(&self, task: &TaskInfo)

A task joined the watchdog’s list.

Source

fn notify(&self, task: &TaskInfo, suspended: bool)

A task changed state. suspended is the new state, so a monitor sees both the fault and the recovery — C notifies on the transition either way (taskwd.c:100-121).

Source

fn remove(&self, task: &TaskInfo)

A task left the list.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§