Trait drone_cortexm::thr::prelude::ThrToken[][src]

pub unsafe trait ThrToken: Clone + Copy + Send + Sync + 'static + Token {
    type Thread: Thread;

    pub const THR_IDX: u16;
    pub fn to_thr(self) -> &'static Self::Thread { ... }
pub fn add_fib<F>(self, fib: F)
    where
        F: RootFiber + Send
, { ... }
pub fn add_fib_factory<C, F>(self, factory: C)
    where
        C: FnOnce() -> F + Send + 'static,
        F: RootFiber
, { ... }
pub 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

pub const THR_IDX: u16[src]

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

Loading content...

Provided methods

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

Returns a reference to the thread object.

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

Adds the fiber fib to the fiber chain.

pub 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.

pub fn is_empty(self) -> bool[src]

Returns true if the fiber chain is empty.

Loading content...

Implementors

Loading content...