Struct bevy_tasks::ComputeTaskPool [−][src]
pub struct ComputeTaskPool(pub TaskPool);
Expand description
A newtype for a task pool for CPU-intensive work that must be completed to deliver the next frame
Tuple Fields
0: TaskPool
Methods from Deref<Target = TaskPool>
Return the number of threads owned by the task pool
Allows spawning non-'static
futures on the thread pool. The function takes a callback,
passing a scope object into it. The scope object provided to the callback can be used
to spawn tasks. This function will await the completion of all tasks before returning.
This is similar to rayon::scope
and crossbeam::scope
Spawns a static future onto the thread pool. The returned Task is a future. It can also be cancelled and “detached” allowing it to continue running without having to be polled by the end-user.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for ComputeTaskPool
impl Send for ComputeTaskPool
impl Sync for ComputeTaskPool
impl Unpin for ComputeTaskPool
impl !UnwindSafe for ComputeTaskPool
Blanket Implementations
Mutably borrows from an owned value. Read more