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:
尹吉峰 2023-08-03 15:47:09 +08:00 committed by GitHub
parent 7ceb4dfd79
commit d9702d35f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 5 deletions

View file

@ -12,7 +12,7 @@ categories = ["game-engines", "data-structures"]
[features]
trace = []
multi-threaded = ["bevy_tasks/multi-threaded"]
default = ["bevy_reflect", "multi-threaded"]
default = ["bevy_reflect"]
[dependencies]
bevy_ptr = { path = "../bevy_ptr", version = "0.12.0-dev" }

View file

@ -10,7 +10,6 @@ keywords = ["bevy"]
[features]
multi-threaded = []
default = ["multi-threaded"]
[dependencies]
futures-lite = "1.4.0"

View file

@ -23,9 +23,9 @@ mod usages;
pub use usages::tick_global_task_pools_on_main_thread;
pub use usages::{AsyncComputeTaskPool, ComputeTaskPool, IoTaskPool};
#[cfg(not(target_arch = "wasm32"))]
#[cfg(all(not(target_arch = "wasm32"), feature = "multi-threaded"))]
mod thread_executor;
#[cfg(not(target_arch = "wasm32"))]
#[cfg(all(not(target_arch = "wasm32"), feature = "multi-threaded"))]
pub use thread_executor::{ThreadExecutor, ThreadExecutorTicker};
mod iter;

View file

@ -1,4 +1,3 @@
#[cfg(target_arch = "wasm32")]
use std::sync::Arc;
use std::{cell::RefCell, future::Future, marker::PhantomData, mem, rc::Rc};