Skip to main content

nova_rt_task_join_future

Function nova_rt_task_join_future 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C-unwind" fn nova_rt_task_join_future( future: *mut u8, ) -> *mut u8
Expand description

A fresh Future<unit> that completes when future’s task does.

Resolves future to a task id through the same BY_STATE path nova_rt_task_is_done uses, so a future no task was spawned for aborts there rather than becoming a park nothing can wake. The id is resolved once, here, rather than on every poll: the target cannot change, and a stale-address abort belongs at the call the Nova program made.

§Safety

future must point to a live FUTURE_SIZE { poll_code, state } block.