Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions benches/benches/bevy_ecs/scheduling/schedule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,5 @@ pub fn empty_schedule_run(criterion: &mut Criterion) {
bencher.iter(|| schedule.run(app.world_mut()));
});

let mut schedule = Schedule::default();
#[expect(deprecated, reason = "We still need to test/bench this.")]
schedule.set_executor_kind(bevy_ecs::schedule::ExecutorKind::Simple);
group.bench_function("Simple", |bencher| {
bencher.iter(|| schedule.run(app.world_mut()));
});
group.finish();
}
32 changes: 4 additions & 28 deletions crates/bevy_ecs/src/schedule/executor/mod.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
#[cfg(feature = "std")]
mod multi_threaded;
mod simple;
mod single_threaded;

use alloc::{vec, vec::Vec};
use bevy_utils::prelude::DebugName;
use core::any::TypeId;

#[expect(deprecated, reason = "We still need to support this.")]
pub use self::{simple::SimpleExecutor, single_threaded::SingleThreadedExecutor};
pub use self::single_threaded::SingleThreadedExecutor;

#[cfg(feature = "std")]
pub use self::multi_threaded::{MainThreadExecutor, MultiThreadedExecutor};
Expand Down Expand Up @@ -62,13 +60,6 @@ pub enum ExecutorKind {
default
)]
SingleThreaded,
/// Like [`SingleThreaded`](ExecutorKind::SingleThreaded) but calls [`apply_deferred`](crate::system::System::apply_deferred)
/// immediately after running each system.
#[deprecated(
since = "0.17.0",
note = "Use SingleThreaded instead. See https://github.com/bevyengine/bevy/issues/18453 for motivation."
)]
Simple,
/// Runs the schedule using a thread pool. Non-conflicting systems can run in parallel.
#[cfg(feature = "std")]
#[cfg_attr(all(not(target_arch = "wasm32"), feature = "multi_threaded"), default)]
Expand Down Expand Up @@ -288,6 +279,7 @@ mod __rust_begin_short_backtrace {
black_box(system.run_unsafe((), world))
}

#[cfg(feature = "std")]
#[inline(never)]
pub(super) fn run(
system: &mut ScheduleSystem,
Expand Down Expand Up @@ -332,12 +324,8 @@ mod tests {
#[derive(Component)]
struct TestComponent;

const EXECUTORS: [ExecutorKind; 3] = [
#[expect(deprecated, reason = "We still need to test this.")]
ExecutorKind::Simple,
ExecutorKind::SingleThreaded,
ExecutorKind::MultiThreaded,
];
const EXECUTORS: [ExecutorKind; 2] =
[ExecutorKind::SingleThreaded, ExecutorKind::MultiThreaded];

#[derive(Resource, Default)]
struct TestState {
Expand Down Expand Up @@ -388,18 +376,6 @@ mod tests {

fn look_for_missing_resource(_res: Res<TestState>) {}

#[test]
#[should_panic]
fn missing_resource_panics_simple() {
let mut world = World::new();
let mut schedule = Schedule::default();

#[expect(deprecated, reason = "We still need to test this.")]
schedule.set_executor_kind(ExecutorKind::Simple);
schedule.add_systems(look_for_missing_resource);
schedule.run(&mut world);
}

#[test]
#[should_panic]
fn missing_resource_panics_single_threaded() {
Expand Down
242 changes: 0 additions & 242 deletions crates/bevy_ecs/src/schedule/executor/simple.rs

This file was deleted.

7 changes: 0 additions & 7 deletions crates/bevy_ecs/src/schedule/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1283,13 +1283,6 @@ mod tests {
};
}

/// verify the [`SimpleExecutor`] supports stepping
#[test]
#[expect(deprecated, reason = "We still need to test this.")]
fn simple_executor() {
assert_executor_supports_stepping!(ExecutorKind::Simple);
}

/// verify the [`SingleThreadedExecutor`] supports stepping
#[test]
fn single_threaded_executor() {
Expand Down
2 changes: 0 additions & 2 deletions crates/bevy_ecs/src/schedule/schedule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,6 @@ impl Schedules {

fn make_executor(kind: ExecutorKind) -> Box<dyn SystemExecutor> {
match kind {
#[expect(deprecated, reason = "We still need to support this.")]
ExecutorKind::Simple => Box::new(SimpleExecutor::new()),
ExecutorKind::SingleThreaded => Box::new(SingleThreadedExecutor::new()),
#[cfg(feature = "std")]
ExecutorKind::MultiThreaded => Box::new(MultiThreadedExecutor::new()),
Expand Down
16 changes: 16 additions & 0 deletions release-content/migration-guides/removed_simple_executor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: Removed `SimpleExecutor`
pull_requests: [21176]
---

Bevy has removed the previously deprecated `SimpleExecutor`, one of the `SystemExecutor`s in Bevy alongside `SingleThreadedExecutor` and `MultiThreadedExecutor` (which aren't going anywhere any time soon).
The `MultiThreadedExecutor` is great at large schedules and async heavy work, and the `SingleThreadedExecutor` is good at smaller schedules or schedules that have fewer parallelizable systems.
So what was `SimpleExecutor` good at? Not much. That's why it was removed. Removing it reduced some maintenance and consistency burdens on maintainers, allowing them to focus on more exciting features!

If you were using `SimpleExecutor`, consider upgrading to `SingleThreadedExecutor` instead, or try `MultiThreadedExecutor` if if fits the schedule.
It's worth mentioning that `SimpleExecutor` ran deferred commands inbetween *each* system, regardless of it it was needed.
The other executors are more efficient about this, but that means they need extra information about when to run those commands.
In most schedules, that information comes from the contents and ordering of systems, via `before`, `after`, `chain`, etc.
If a schedule that was previously using `SimpleExecutor` still needs commands from one system to be applied before another system runs,
make sure that ordering is enforced explicitly by these methods, rather than implicitly by the order of `add_systems`.
If you are looking for a quick fix, `chain` is the easiest way to do this.
Loading