Lines Matching +full:rust +full:- +full:executor
1 //! Asynchronous green-threads.
5 //! A _task_ is a light weight, non-blocking unit of execution. A task is similar
30 //! * Tasks are **non-blocking**. Typically, when an OS thread performs I/O or
42 //! [Kotlin's coroutines]: https://kotlinlang.org/docs/reference/coroutines-overview.html
73 //! # #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> {
129 //! _non-blocking_ future on the Tokio runtime, it instead spawns a
138 //! // do some compute-heavy work or call synchronous code
146 //! ```rust
148 //! # async fn docs() -> Result<(), Box<dyn std::error::Error>>{
150 //! // do some compute-heavy work or call synchronous code
162 //! When using the [multi-threaded runtime][rt-multi-thread], the [`task::block_in_place`]
177 //! // do some compute-heavy work or call synchronous code
194 //! ```rust
204 //! // Yield, allowing the newly-spawned task to execute first.
214 //! A single call to [`poll`] on a top-level task may potentially do a lot of
216 //! time without yielding back to the executor, it can starve other tasks
217 //! waiting on that executor to execute them, or drive underlying resources.
218 //! Since Rust does not have a runtime, it is difficult to forcibly preempt a
219 //! long-running task. Instead, this module provides an opt-in mechanism for
220 //! futures to collaborate with the executor to avoid starvation.
233 //! yield, and will starve other tasks and resources on the same executor.
236 //! functions, which force tasks to return to the executor periodically.
267 //! [rt-multi-thread]: ../runtime/index.html#threaded-scheduler