[−][src]Module tokio_executor::current_thread
A single-threaded executor which executes tasks on the same thread from which they are spawned.
CurrentThread
is the main type of this crate. It executes tasks on the
current thread. The easiest way to start a new CurrentThread
executor
is to call block_on_all
with an initial task to seed the executor. All
tasks that are being managed by a CurrentThread
executor are able to
spawn additional tasks by calling spawn
.
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.
Structs
BlockError | Error returned by the |
CurrentThread | Executes tasks on the current thread |
Entered | A |
Handle | Handle to spawn a future on the corresponding |
RunError | Error returned by the |
RunTimeoutError | Error returned by the |
TaskExecutor | Executes futures on the current thread. |
Turn | Returned by the |
TurnError | Error returned by the |
Functions
block_on_all | Run the executor bootstrapping the execution with the provided future. |
spawn | Executes a future on the current thread. |