Trait drone_cortexm::thr::ThrToken [−][src]
Token for a thread in a thread pool.
Safety
- At most one trait implementation per thread must exist.
ThrToken::THR_IDX
must be less than [ThrToken::Thread::COUNT
].
Associated Types
Loading content...Associated Constants
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]
F: RootFiber + Send,
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]
C: FnOnce() -> F + Send + 'static,
F: RootFiber,
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.