#thread-local #async #gui #run-time #events #platform-specific #platform-independent

rt-local

Thread local asynchronous runtime working with platform-specific event loops

5 releases

0.1.4 Aug 20, 2023
0.1.3 Aug 19, 2023
0.1.2 May 31, 2022
0.1.1 May 31, 2022
0.1.0 May 31, 2022

#591 in Asynchronous

Download history 1/week @ 2024-02-08 8/week @ 2024-02-15 16/week @ 2024-02-22 21/week @ 2024-02-29 52/week @ 2024-03-07 15/week @ 2024-03-14 10/week @ 2024-03-21 10/week @ 2024-03-28

88 downloads per month
Used in cancellation-token

MIT/Apache

25KB
571 lines

rt-local

Crates.io Docs.rs Actions Status

Thread local asynchronous runtime working with platform-specific event loops.

Example

use rt_local::spawn_local;
use rt_local::runtime::core::main;

#[main]
async fn main() {
  let task_a = spawn_local(async {
    // ...
  });
  let task_b = spawn_local(async {
    // ...
  });
  task_a.await;
  task_b.await;
}

Features

crate feature module backend
core platform independent
windows windows windows message loop

License

This project is dual licensed under Apache-2.0/MIT. See the two LICENSE-* files for details.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0.4–43MB
~596K SLoC