[][src]Trait drone_core::thr::ThrToken

pub unsafe trait ThrToken where
    Self: Sized + Clone + Copy,
    Self: Send + Sync + 'static,
    Self: Token
{ type Thr: Thread; const THR_NUM: usize; fn to_thr(self) -> &'static Self::Thr { ... }
fn add_fib<F: FiberRoot>(self, fib: F) { ... }
fn is_empty(self) -> bool { ... } }

The base trait for a thread token.

Safety

ThrToken::THR_NUM must be a valid index in ThrToken::Thr's array returned by Thread::first method.

Associated Types

type Thr: Thread

The thread type.

Loading content...

Associated Constants

const THR_NUM: usize

Position of the thread inside ThrToken::Thr's array returned by Thread::first method.

Loading content...

Provided methods

fn to_thr(self) -> &'static Self::Thr

Returns a reference to the thread object.

fn add_fib<F: FiberRoot>(self, fib: F)

Adds the fiber fib to the fiber chain.

fn is_empty(self) -> bool

Returns true if the fiber chain is empty.

Loading content...

Implementors

Loading content...