bevy/crates/bevy_ecs/src/schedule
Chris Russell c4caebb528
Run the multi-threaded executor at the end of each system task. (#11906)
# Objective

The multi-threaded executor currently runs in a dedicated task on a
single thread. When a system finishes running, it needs to notify that
task and wait for the thread to be available and running before the
executor can process the completion.

See #8304

## Solution

Run the multi-threaded executor at the end of each system task. This
allows it to run immediately instead of needing to wait for the main
thread to wake up. Move the mutable executor state into a separate
struct and wrap it in a mutex so it can be shared among the worker
threads.

While this should be faster in theory, I don't actually know how to
measure the performance impact myself.

---------

Co-authored-by: James Liu <contact@jamessliu.com>
Co-authored-by: Mike <mike.hsu@gmail.com>
2024-02-26 03:18:34 +00:00
..
executor Run the multi-threaded executor at the end of each system task. (#11906) 2024-02-26 03:18:34 +00:00
condition.rs Remove APIs deprecated in 0.13 (#11974) 2024-02-19 19:04:47 +00:00
config.rs fix some typos (#12038) 2024-02-22 18:55:22 +00:00
graph_utils.rs Auto insert sync points (#9822) 2023-12-14 16:34:01 +00:00
mod.rs System Stepping implemented as Resource (#8453) 2024-02-03 05:18:38 +00:00
schedule.rs Check cfg during CI and fix feature typos (#12103) 2024-02-25 15:19:27 +00:00
set.rs Fix SystemTypeSet::system_type being out of sync with System::type_id (#12030) 2024-02-21 23:40:45 +00:00
state.rs Optional state (#11417) 2024-01-19 21:38:04 +00:00
stepping.rs System::type_id Consistency (#11728) 2024-02-06 14:43:33 +00:00