Would it be possible to have someone explain to me the lifetime of a future driven by ic_cdk::spawn
within a canister. Does the future continue processing after a reply has been given potentially consuming all the cycles for an invocation? Or, does it suspend at some point?
What I’d like to do is use ic_cdk::spawn
to spawn call futures which will “eventually” be woken up by call responses. Something like…
async fn do_call() -> () {
match ic_cdk::api::call::call_raw(.., .., .., ..).await {
Ok(_) => {
// continue something
}
Err(_) => {
// maybe dead letter queue, maybe fail
}
}
}
ic_cdk::spawn(do_call());