mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
208ecb53dc
# 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` |
||
---|---|---|
.. | ||
async_compute.rs | ||
external_source_external_thread.rs |