async fn run_task(id: i32, sender: Sender<TestCall>, beat: Beat) {
    
    // Deploy would help determine frequency better
    beat.deploy();

    for i in 1..=id {
        assert!(beat.now().is_ok(), "Cannot send beat to the runtime");
        assert!(sender.send(TestCall::TestBeat(id)).is_ok(), "Counter fail");
        smol::Timer::after(Duration::from_secs(i as u64)).await; 
    }
    assert!(sender.send(TestCall::TestFinished).is_ok(), "Task completed counter");
}
// Mock test task which supports a seperate counter
Mock test task which supports a seperate counter
Mock test task which supports a seperate counter
async fn run_task(id: i32, sender: Sender<TestCall>, beat: Beat) {
    // Deploy would help determine frequency better
    beat.deploy();
    for i in 1..=id {
        assert!(beat.now().is_ok(), "Cannot send beat to the runtime");
        assert!(sender.send(TestCall::TestBeat(id)).is_ok(), "Counter fail");
        smol::Timer::after(Duration::from_secs(i as u64)).await; 
    }
    assert!(sender.send(TestCall::TestFinished).is_ok(), "Task completed counter");
}
async fn run_task ( id : i32 , sender : Sender < TestCall > , beat : Beat ) { // Deploy would help determine frequency better beat . deploy ( ) ; for i in 1 ..= id { assert ! ( beat now ( ) is_ok ( ) " " ) ; assert ! ( sender send ( TestCall TestBeat ( id ) ) is_ok ( ) " " ) ; smol :: Timer :: after ( Duration :: from_secs ( i as u64 ) ) . await ; } assert ! ( sender send ( TestCall TestFinished ) is_ok ( ) " " ) ; }
Mock test task which supports a seperate counter
Mock test task which supports a seperate counter
id
i32
sender
Sender<TestCall>
beat
Beat
id
i32
sender
Sender<TestCall>
beat
Beat