use std::time::Duration;

use yasync::Runtime;

fn main() {
    let runtime = Runtime::new(4);

    runtime.spawn(async move {
        loop {
            println!("a");
            yasync::sleep(Duration::from_secs(1)).await;
        }
    });

    runtime.spawn(async move {
        loop {
            println!("b");
            yasync::sleep(Duration::from_millis(500)).await;
        }
    });

    runtime.join();
}
