bevy/examples/app/thread_pool_resources.rs

12 lines
306 B
Rust
Raw Normal View History

//! This example illustrates how to customize the thread pool used internally (e.g. to only use a
//! certain number of threads).
use bevy::prelude::*;
fn main() {
App::new()
.insert_resource(DefaultTaskPoolOptions::with_num_threads(4))
.add_plugins(DefaultPlugins)
.run();
}