mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
17e7642611
Add bevy_tasks crate to replace rayon
11 lines
336 B
Rust
11 lines
336 B
Rust
use bevy::prelude::*;
|
|
use bevy_app::DefaultTaskPoolOptions;
|
|
|
|
/// This example illustrates how to customize the thread pool used internally (e.g. to only use a
|
|
/// certain number of threads).
|
|
fn main() {
|
|
App::build()
|
|
.add_resource(DefaultTaskPoolOptions::with_num_threads(4))
|
|
.add_default_plugins()
|
|
.run();
|
|
}
|