docs/bevy/examples/app/thread_pool_resources.rs 337 B · 12 lines · raw · history

1 //! This example illustrates how to customize the thread pool used internally (e.g. to only use a
2 //! certain number of threads).
3
4 use bevy::prelude::*;
5
6 fn main() {
7 App::new()
8 .add_plugins(DefaultPlugins.set(TaskPoolPlugin {
9 task_pool_options: TaskPoolOptions::with_num_threads(4),
10 }))
11 .run();
12 }