bevy/docs
James Liu d33f5c759c
Add optional single-threaded feature to bevy_ecs/bevy_tasks (#6690)
# Objective
Fixes #6689.

## Solution
Add `single-threaded` as an optional non-default feature to `bevy_ecs`
and `bevy_tasks` that:
 
 - disable the `ParallelExecutor` as a default runner
 - disables the multi-threaded `TaskPool`
- internally replace `QueryParIter::for_each` calls with
`Query::for_each`.

Removed the `Mutex` and `Arc` usage in the single-threaded task pool.


![image](https://user-images.githubusercontent.com/3137680/202833253-dd2d520f-75e6-4c7b-be2d-5ce1523cbd38.png)

## Future Work/TODO
Create type aliases for `Mutex`, `Arc` that change to single-threaaded
equivalents where possible.

---

## Changelog
Added: Optional default feature `multi-theaded` to that enables
multithreaded parallelism in the engine. Disabling it disables all
multithreading in exchange for higher single threaded performance. Does
nothing on WASM targets.

---------

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2023-07-09 04:22:15 +00:00
..
cargo_features.md Add optional single-threaded feature to bevy_ecs/bevy_tasks (#6690) 2023-07-09 04:22:15 +00:00
debugging.md Useful changes with relicensing benefits (#2497) 2021-07-17 21:59:31 +00:00
linters.md GitHub Action: Check local Markdown links on push (#2067) 2021-05-02 20:22:32 +00:00
linux_dependencies.md Add setup documentation for Alpine Linux (#7752) 2023-02-20 04:31:49 +00:00
plugins_guidelines.md Remove last mentions of Stages (#7553) 2023-02-07 18:07:57 +00:00
profiling.md Process 1 in Chrome tracing starts expanded (#8024) 2023-03-11 03:04:41 +00:00
release_checklist.md Fix release workflow (#4903) 2022-06-06 15:47:51 +00:00
the_bevy_organization.md remove bors and small CI improvements (#7947) 2023-03-07 21:42:53 +00:00