bevy/crates/bevy_ecs/src
Mike 208ecb53dc
Append commands (#10400)
# Objective

- I've been experimenting with different patterns to try and make async
tasks more convenient. One of the better ones I've found is to return a
command queue to allow for deferred &mut World access. It can be
convenient to check for task completion in a normal system, but it is
hard to do something with the command queue after getting it back. This
pr adds a `append` to Commands. This allows appending the returned
command queue onto the system's commands.

## Solution

- I edited the async compute example to use the new `append`, but not
sure if I should keep the example changed as this might be too
opinionated.

## Future Work

- It would be very easy to pull the pattern used in the example out into
a plugin or a external crate, so users wouldn't have to add the checking
system.

---

## Changelog

- add `append` to `Commands` and `CommandQueue`
2023-11-22 00:04:37 +00:00
..
entity Optimise Entity with repr align & manual PartialOrd/Ord (#10558) 2023-11-18 20:04:37 +00:00
query Derive Error for more error types (#10240) 2023-10-28 22:20:37 +00:00
reflect Use EntityHashMap for EntityMapper (#10415) 2023-11-07 08:23:04 +00:00
schedule Some docs for IntoSystemSet (#10563) 2023-11-16 17:44:42 +00:00
storage Make builder types take and return Self (#10001) 2023-10-09 19:46:17 +00:00
system Append commands (#10400) 2023-11-22 00:04:37 +00:00
world Add an Entry api to EntityWorldMut. (#10650) 2023-11-21 01:26:06 +00:00
archetype.rs Add a public API to ArchetypeGeneration/Id (#9825) 2023-10-02 12:54:45 +00:00
bundle.rs Allow #[derive(Bundle)] on tuple structs (take 3) (#10561) 2023-11-21 01:09:16 +00:00
change_detection.rs Updates for rust 1.73 (#10035) 2023-10-06 00:31:10 +00:00
component.rs Updates for rust 1.73 (#10035) 2023-10-06 00:31:10 +00:00
event.rs Update Event send methods to return EventId (#10551) 2023-11-16 17:20:43 +00:00
lib.rs Enable clippy::undocumented_unsafe_blocks warning across the workspace (#10646) 2023-11-21 02:06:24 +00:00
removal_detection.rs Hide UnsafeWorldCell::unsafe_world (#9741) 2023-10-02 12:46:43 +00:00