Struct mioco::sched::Coroutine
[−]
[src]
pub struct Coroutine { /* fields omitted */ }
Coroutine scheduling handle.
Through this interface schedulers can operate on coroutines.
Methods
impl CoroutineControl
[src]
fn kill(&self)
Finish coroutine
impl CoroutineControl
[src]
fn resume(self, event_loop: &mut EventLoop<Handler>)
Resume Coroutine.
fn migrate(self, event_loop: &mut EventLoop<Handler>, thread_id: usize)
Migrate to a different thread.
Move this Coroutine to be executed on a SchedulerThread
for a
given thread_id
.
Will panic if thread_id
is not valid.
fn reattach_to(
&mut self,
event_loop: &mut EventLoop<Handler>,
handler: &mut Handler
)
&mut self,
event_loop: &mut EventLoop<Handler>,
handler: &mut Handler
)
Finish migrating Coroutine by attaching it to a new thread.
fn is_yielding(&self) -> bool
Is this Coroutine ready after yield_now()
?
fn get_userdata<T: Any>(&self) -> Option<ErasedArcRef<T>>
Get coroutine user-provided data.