#tokio #future

tokio-current-thread

Single threaded executor which manage many tasks concurrently on the current thread

10 releases

0.2.0-alpha.1 Aug 8, 2019
0.1.7 Feb 5, 2020
0.1.6 Mar 22, 2019
0.1.4 Nov 22, 2018
0.0.0 Feb 8, 2018

#179 in #futures

Download history 34843/week @ 2024-02-26 34707/week @ 2024-03-04 35717/week @ 2024-03-11 35954/week @ 2024-03-18 34327/week @ 2024-03-25 32343/week @ 2024-04-01 29269/week @ 2024-04-08 31473/week @ 2024-04-15 33035/week @ 2024-04-22 33671/week @ 2024-04-29 36259/week @ 2024-05-06 33937/week @ 2024-05-13 36973/week @ 2024-05-20 33306/week @ 2024-05-27 41237/week @ 2024-06-03 34477/week @ 2024-06-10

147,458 downloads per month
Used in 841 crates (12 directly)

MIT license

320KB
5.5K SLoC

tokio-current-thread

Single threaded executor for Tokio.

License

This project is licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Tokio by you, shall be licensed as MIT, without any additional terms or conditions.


lib.rs:

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.

Dependencies

~395KB