#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

#319 in #futures

Download history 27167/week @ 2023-11-25 27122/week @ 2023-12-02 28410/week @ 2023-12-09 23226/week @ 2023-12-16 13790/week @ 2023-12-23 19541/week @ 2023-12-30 28171/week @ 2024-01-06 25949/week @ 2024-01-13 25600/week @ 2024-01-20 27435/week @ 2024-01-27 27829/week @ 2024-02-03 26822/week @ 2024-02-10 34652/week @ 2024-02-17 34837/week @ 2024-02-24 35168/week @ 2024-03-02 13768/week @ 2024-03-09

123,048 downloads per month
Used in 846 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