pub async unsafe fn spawn_with_driver<F, Driver, Run, Map, T>(
manager: &'static Manager,
parent: TaskIdentifier,
name: &str,
stack: Stack,
entry: F,
driver: Run,
map: Map,
) -> Result<(JoinHandle<T>, TaskIdentifier)>Expand description
Like spawn_with_result, with a local future that drives the entry coroutine.
§Safety
Same contract as spawn. The driver must keep all native execution on the task’s
executor and stop it before releasing the resources borrowed by the entry.