Struct tokio_current_thread::Handle[][src]

pub struct Handle { /* fields omitted */ }

Handle to spawn a future on the corresponding CurrentThread instance

Methods

impl Handle
[src]

Spawn a future onto the CurrentThread instance corresponding to this handle

Panics

This function panics if the spawn fails. Failure occurs if the CurrentThread instance of the Handle does not exist anymore.

Provides a best effort hint to whether or not spawn will succeed.

This function may return both false positives and false negatives. If status returns Ok, then a call to spawn will probably succeed, but may fail. If status returns Err, a call to spawn will probably fail, but may succeed.

This allows a caller to avoid creating the task if the call to spawn has a high likelihood of failing.

Trait Implementations

impl Clone for Handle
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Handle
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Handle

impl !Sync for Handle