[][src]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[src]

pub fn with_num_threads(thread_count: usize) -> Self[src]

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

pub fn create_default_pools(&self, resources: &mut Resources)[src]

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

Trait Implementations

impl Clone for DefaultTaskPoolOptions[src]

impl Default for DefaultTaskPoolOptions[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

impl<T> Downcast for T where
    T: Any

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

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

impl<T> FromResources for T where
    T: Default
[src]

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

impl<T> Resource for T where
    T: 'static + Send + Sync
[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<V, T> VZip<V> for T where
    V: MultiLane<T>,