bevy/crates/bevy_tasks/src
Mike 8eb8ad5c4a await tasks to cancel (#6696)
# Objective

- Fixes https://github.com/bevyengine/bevy/issues/6603

## Solution

- `Task`s will cancel when dropped, but wait until they return Pending before they actually get canceled. That means that if a task panics, it's possible for that error to get propagated to the scope and the scope gets dropped, while scoped tasks in other threads are still running. This is a big problem since scoped task can hold life-timed values that are dropped as the scope is dropped leading to UB.

---

## Changelog

- changed `Scope` to use `FallibleTask` and await the cancellation of all remaining tasks when it's dropped.
2022-11-23 00:41:19 +00:00
..
iter small and mostly pointless refactoring (#2934) 2022-02-13 22:33:55 +00:00
lib.rs Revert "Show prelude re-exports in docs (#6448)" (#6449) 2022-11-02 20:40:45 +00:00
single_threaded_task_pool.rs Nested spawns on scope (#4466) 2022-09-28 01:59:10 +00:00
slice.rs Document bevy_tasks and enable #![warn(missing_docs)] (#3509) 2022-01-16 04:53:22 +00:00
task.rs Add is_finished to Task<T> (#6444) 2022-11-02 12:27:22 +00:00
task_pool.rs await tasks to cancel (#6696) 2022-11-23 00:41:19 +00:00
usages.rs tick local executor (#6121) 2022-10-24 13:46:40 +00:00