Skip to main content

spawn_with_result

Function spawn_with_result 

Source
pub async unsafe fn spawn_with_result<F, Map, T>(
    manager: &'static Manager,
    parent: TaskIdentifier,
    name: &str,
    stack: Stack,
    entry: F,
    map: Map,
) -> Result<(JoinHandle<T>, TaskIdentifier)>
where F: FnOnce() -> i32 + 'static, Map: FnOnce(i32) -> T + 'static, T: 'static,
Expand description

Like spawn, converting the exit status before signaling the task join handle.

ยงSafety

Same contract as spawn.