bevy/examples/app/thread_pool_resources.rs

11 lines
305 B
Rust
Raw Normal View History

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