#executor #tokio #future #task #thread #threaded #execute

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

#12 in #threaded

Download history 35289/week @ 2024-07-20 34811/week @ 2024-07-27 33089/week @ 2024-08-03 34447/week @ 2024-08-10 27120/week @ 2024-08-17 28410/week @ 2024-08-24 27610/week @ 2024-08-31 29822/week @ 2024-09-07 25950/week @ 2024-09-14 24359/week @ 2024-09-21 37920/week @ 2024-09-28 35077/week @ 2024-10-05 36754/week @ 2024-10-12 32883/week @ 2024-10-19 32876/week @ 2024-10-26 26446/week @ 2024-11-02

133,580 downloads per month
Used in 831 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