frozenlib / rt-local

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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::blocking::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
blocking no framework
windows windows windows message loop
eframe eframe eframe (egui framework)

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.

About

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

License:Apache License 2.0


Languages

Language:Rust 100.0%