Function bevy_defer::spawn

source ·
pub fn spawn<T: Send + 'static>(
    fut: impl Future<Output = T> + Send + 'static
) -> impl Future<Output = T>
Expand description

Spawn a bevy_defer compatible future.

§Handle

The handle can be used to obtain the result, if dropped, the associated future will be dropped by the executor.

Can only be used inside a bevy_defer future.