Trait CheckMutexAccessDurationTrait

Source
pub trait CheckMutexAccessDurationTrait {
    // Required methods
    fn get_warn_lock(&self, key_opt: &Option<&AquariumSignal>) -> bool;
    fn set_warn_lock(&mut self, key: &Option<&AquariumSignal>, value: bool);
    fn get_max_mutex_access_duration(&self) -> Duration;
    fn get_location(&self) -> &str;

    // Provided method
    fn check_mutex_access_duration(
        &mut self,
        key_opt: Option<&AquariumSignal>,
        instant_after_locking_mutex: Instant,
        instant_before_locking_mutex: Instant,
    ) { ... }
}

Required Methods§

Source

fn get_warn_lock(&self, key_opt: &Option<&AquariumSignal>) -> bool

Reads the warn-lock. This flag is used to prevent log-flooding

Source

fn set_warn_lock(&mut self, key: &Option<&AquariumSignal>, value: bool)

Sets the warn-lock. This flag is used to prevent log-flooding

Source

fn get_max_mutex_access_duration(&self) -> Duration

Provides the maximum permissible access duration

Source

fn get_location(&self) -> &str

Inform the originator for logging purposes

Provided Methods§

Source

fn check_mutex_access_duration( &mut self, key_opt: Option<&AquariumSignal>, instant_after_locking_mutex: Instant, instant_before_locking_mutex: Instant, )

Implementors§