Struct bevy::core::DefaultTaskPoolOptions[]

pub struct DefaultTaskPoolOptions {
    pub min_total_threads: usize,
    pub max_total_threads: usize,
    pub io: TaskPoolThreadAssignmentPolicy,
    pub async_compute: TaskPoolThreadAssignmentPolicy,
    pub compute: TaskPoolThreadAssignmentPolicy,
}

Helper for configuring and creating the default task pools. For end-users who want full control, insert the default task pools into the resource map manually. If the pools are already inserted, this helper will do nothing.

Fields

min_total_threads: usize

If the number of physical cores is less than min_total_threads, force using min_total_threads

max_total_threads: usize

If the number of physical cores is grater than max_total_threads, force using max_total_threads

io: TaskPoolThreadAssignmentPolicy

Used to determine number of IO threads to allocate

async_compute: TaskPoolThreadAssignmentPolicy

Used to determine number of async compute threads to allocate

compute: TaskPoolThreadAssignmentPolicy

Used to determine number of compute threads to allocate

Implementations

impl DefaultTaskPoolOptions

pub fn with_num_threads(thread_count: usize) -> DefaultTaskPoolOptions

Create a configuration that forces using the given number of threads.

pub fn create_default_pools(&self, world: &mut World)

Inserts the default thread pools into the given resource map based on the configured values

Trait Implementations

impl Clone for DefaultTaskPoolOptions

impl Default for DefaultTaskPoolOptions

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CloneAny for T where
    T: Any + Clone

impl<T> Component for T where
    T: 'static + Send + Sync

impl<T> Downcast for T where
    T: Any

impl<T> Downcast<T> for T

impl<T> DowncastSync for T where
    T: Any + Send + Sync

impl<T> From<T> for T[src]

impl<T> FromWorld for T where
    T: Default

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> TypeData for T where
    T: 'static + Send + Sync + Clone

impl<T> Upcast<T> for T

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,