bevy/crates/bevy_ecs/src/schedule
Giacomo Stevanato 106db47f69
Fix subtle/weird UB in the multi threaded executor (#15309)
# Objective

- The multithreaded executor has some weird UB related to stacked
borrows and async blocks
- See my explanation on discord
https://discord.com/channels/691052431525675048/749335865876021248/1286359267921887232
- Closes #15296 (can this be used to close PRs?)

## Solution

- Don't create a `&mut World` reference outside `async` blocks and then
capture it, but instead directly create it inside the `async` blocks.
This avoids it being captured, which has some weird requirement on its
validity.

## Testing

- Added a regression test
2024-09-19 18:15:58 +00:00
..
executor Fix subtle/weird UB in the multi threaded executor (#15309) 2024-09-19 18:15:58 +00:00
condition.rs Add condition_changed and condition_became_true to common_conditions (#14917) 2024-08-26 18:32:44 +00:00
config.rs Group IntoSystemConfigs impls together (#15254) 2024-09-17 17:57:22 +00:00
graph_utils.rs Use a unstable sort to sort component ids in bevy_ecs (#13789) 2024-06-17 14:56:19 +00:00
mod.rs Separate component and resource access (#14561) 2024-08-06 01:19:39 +00:00
schedule.rs Remove allocation in get_short_name (#15294) 2024-09-19 15:34:03 +00:00
set.rs Add on_unimplemented Diagnostics to Most Public Traits (#13347) (#13662) 2024-06-04 00:31:34 +00:00
stepping.rs Fix beta lints (#12980) 2024-04-16 02:46:46 +00:00