Skip to main content

ExternalWaitSource

Trait ExternalWaitSource 

pub trait ExternalWaitSource:
    Send
    + Sync
    + 'static {
    // Required method
    fn is_alive(&self) -> bool;
}
Expand description

外部宿主提供的等待关系身份接口;不允许把目标自身伪装为外部等待者。 这是逻辑协议,不授予原值访问或指针恢复能力;违反协议不获得循环检测保证。

Required Methods§

fn is_alive(&self) -> bool

宿主是否仍承接这一身份的退出/放弃责任;必须线程安全且不阻塞。

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§