Skip to main content

ExecutorTimer

Trait ExecutorTimer 

Source
pub trait ExecutorTimer: TimerTaskQueue<Item = TimerEntry<<Self as TimerTaskQueue>::Key, <Self::Access as TimerAccess>::Registration>> {
    type Access: TimerAccess<Instant = <Self as TimerTaskQueue>::Instant, Key = <Self as TimerTaskQueue>::Key>;

    // Required methods
    fn timer_access(&self) -> Self::Access;
    fn process_cancel_retries(&mut self) -> Result<QueueCleanupProgress>;
}
Expand description

既有定时队列(timer queue)与核心计时访问的组合;静态分发,不暴露给普通业务使用者。

原TimerTaskQueue仍管理时间、取出和清理;本接口仅增加同源核心访问和有限取消重试。 Item精确关联同一Access的登记类型,不把任意队列载荷当核心计时原值。

Required Associated Types§

Source

type Access: TimerAccess<Instant = <Self as TimerTaskQueue>::Instant, Key = <Self as TimerTaskQueue>::Key>

Required Methods§

Source

fn timer_access(&self) -> Self::Access

Source

fn process_cancel_retries(&mut self) -> Result<QueueCleanupProgress>

在普通定时推进前有限处理预备取消节点;不分配每次重试,不等待键或其它发布者。

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§