[][src]Crate tokio_current_thread

A single-threaded executor which executes tasks on the same thread from which they are spawned.

The crate provides:

Application authors will not use this crate directly. Instead, they will use the tokio crate. Library authors should only depend on tokio-current-thread if they are building a custom task executor.

For more details, see executor module documentation in the Tokio crate.

Structs

BlockError

Error returned by the block_on function.

CurrentThread

Executes tasks on the current thread

Entered

A CurrentThread instance bound to a supplied execution context.

Handle

Handle to spawn a future on the corresponding CurrentThread instance

RunError

Error returned by the run function.

RunTimeoutError

Error returned by the run_timeout function.

TaskExecutor

Executes futures on the current thread.

Turn

Returned by the turn function.

TurnError

Error returned by the turn function.

Functions

block_on_all

Run the executor bootstrapping the execution with the provided future.

spawn

Executes a future on the current thread.