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

pub unsafe trait ThrToken where
    Self: Sized + Clone + Copy,
    Self: Send + Sync + 'static,
    Self: Token
{ type Thread: Thread; const THR_IDX: u16; fn to_thr(self) -> &'static Self::Thread { ... }
fn add_fib<F>(self, fib: F)
    where
        F: RootFiber + Send
, { ... }
fn add_fib_factory<C, F>(self, factory: C)
    where
        C: FnOnce() -> F + Send + 'static,
        F: RootFiber
, { ... }
fn is_empty(self) -> bool { ... } }

Token for a thread in a thread pool.

Safety

Associated Types

type Thread: Thread[src]

The thread type.

Loading content...

Associated Constants

const THR_IDX: u16[src]

Position of the thread within [Self::Thread::pool] array.

Loading content...

Provided methods

fn to_thr(self) -> &'static Self::Thread[src]

Returns a reference to the thread object.

fn add_fib<F>(self, fib: F) where
    F: RootFiber + Send
[src]

Adds the fiber fib to the fiber chain.

fn add_fib_factory<C, F>(self, factory: C) where
    C: FnOnce() -> F + Send + 'static,
    F: RootFiber
[src]

Adds the fiber returned by factory to the fiber chain.

This method is useful for non-Send fibers.

fn is_empty(self) -> bool[src]

Returns true if the fiber chain is empty.

Loading content...

Implementors

Loading content...