bevy/crates/bevy_tasks/src
Joseph ee15be8549
Make Tasks functional on WASM (#13889)
# Objective

Right not bevy's task pool abstraction is kind of useless on wasm, since
it returns a `FakeTask` which can't be interacted with. This is only
good for fire-and-forget it tasks, and isn't even that useful since it's
just a thin wrapper around `wasm-bindgen-futures::spawn_local`

## Solution

Add a simple `Task<T>` handler type to wasm targets that allow waiting
for a task's output or periodically checking for its completion. This PR
aims to give the wasm version of these tasks feature parity with the
native, multi-threaded version of the task

## Testing

- Did you test these changes? *Not yet*

---------

Co-authored-by: Periwink <charlesbour@gmail.com>
Co-authored-by: Jan Hohenheim <jan@hohenheim.ch>
2024-07-16 01:15:03 +00:00
..
iter Apply Clippy lints regarding lazy evaluation and closures (#14015) 2024-07-01 15:54:40 +00:00
lib.rs Make Tasks functional on WASM (#13889) 2024-07-16 01:15:03 +00:00
single_threaded_task_pool.rs Make Tasks functional on WASM (#13889) 2024-07-16 01:15:03 +00:00
slice.rs Add an index argument to parallel iteration helpers in bevy_tasks (#12169) 2024-02-29 08:50:44 +00:00
task_pool.rs Apply Clippy lints regarding lazy evaluation and closures (#14015) 2024-07-01 15:54:40 +00:00
task.rs Remove async-task as a dependency (#13071) 2024-04-23 14:57:55 +00:00
thread_executor.rs remove repetitive code (#12270) 2024-03-03 07:58:22 +00:00
usages.rs Global TaskPool API improvements (#10008) 2023-10-23 20:48:48 +00:00
wasm_task.rs Make Tasks functional on WASM (#13889) 2024-07-16 01:15:03 +00:00