Trait drone_core::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
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]
F: RootFiber + Send,
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]
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.
fn is_empty(self) -> bool
[src]
Returns true
if the fiber chain is empty.