Trait base::sys::unix::signal::Killable

source ·
pub unsafe trait Killable {
    fn pthread_handle(&self) -> pthread_t;

    fn kill(&self, num: c_int) -> Result<()> { ... }
}
Expand description

Trait for threads that can be signalled via pthread_kill.

Note that this is only useful for signals between SIGRTMIN and SIGRTMAX because these are guaranteed to not be used by the C runtime.

Safety

This is marked unsafe because the implementation of this trait must guarantee that the returned pthread_t is valid and has a lifetime at least that of the trait object.

Required Methods§

Provided Methods§

Sends the signal num to this killable thread.

The value of num must be within [SIGRTMIN, SIGRTMAX] range.

Implementations on Foreign Types§

Implementors§