opt-out multi-threaded
feature flag (#9269)
# Objective Fixes #9113 ## Solution disable `multi-threaded` default feature ## Migration Guide The `multi-threaded` feature in `bevy_ecs` and `bevy_tasks` is no longer enabled by default. However, this remains a default feature for the umbrella `bevy` crate. If you depend on `bevy_ecs` or `bevy_tasks` directly, you should consider enabling this to allow systems to run in parallel.
This commit is contained in:
parent
7ceb4dfd79
commit
d9702d35f1
@ -12,7 +12,7 @@ categories = ["game-engines", "data-structures"]
|
|||||||
[features]
|
[features]
|
||||||
trace = []
|
trace = []
|
||||||
multi-threaded = ["bevy_tasks/multi-threaded"]
|
multi-threaded = ["bevy_tasks/multi-threaded"]
|
||||||
default = ["bevy_reflect", "multi-threaded"]
|
default = ["bevy_reflect"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bevy_ptr = { path = "../bevy_ptr", version = "0.12.0-dev" }
|
bevy_ptr = { path = "../bevy_ptr", version = "0.12.0-dev" }
|
||||||
|
@ -10,7 +10,6 @@ keywords = ["bevy"]
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
multi-threaded = []
|
multi-threaded = []
|
||||||
default = ["multi-threaded"]
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
futures-lite = "1.4.0"
|
futures-lite = "1.4.0"
|
||||||
|
@ -23,9 +23,9 @@ mod usages;
|
|||||||
pub use usages::tick_global_task_pools_on_main_thread;
|
pub use usages::tick_global_task_pools_on_main_thread;
|
||||||
pub use usages::{AsyncComputeTaskPool, ComputeTaskPool, IoTaskPool};
|
pub use usages::{AsyncComputeTaskPool, ComputeTaskPool, IoTaskPool};
|
||||||
|
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(all(not(target_arch = "wasm32"), feature = "multi-threaded"))]
|
||||||
mod thread_executor;
|
mod thread_executor;
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(all(not(target_arch = "wasm32"), feature = "multi-threaded"))]
|
||||||
pub use thread_executor::{ThreadExecutor, ThreadExecutorTicker};
|
pub use thread_executor::{ThreadExecutor, ThreadExecutorTicker};
|
||||||
|
|
||||||
mod iter;
|
mod iter;
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#[cfg(target_arch = "wasm32")]
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::{cell::RefCell, future::Future, marker::PhantomData, mem, rc::Rc};
|
use std::{cell::RefCell, future::Future, marker::PhantomData, mem, rc::Rc};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user