bevy/crates/bevy_app
James Liu a02c5ae819 Copy TaskPool resoures to subapps (#4792)
# Objective
Fixes #4791. `ParallelExecutor` inserts a default `CompteTaskPool` if there isn't one stored as a resource, including when it runs on a different world. When spawning the render sub-app, the main world's `ComputeTaskPool` is not cloned and inserted into the render app's, which causes a second `ComputeTaskPool` with the default configuration to be spawned. This results in an excess number of threads being spawned.

## Solution
Copy the task pools from the main world to the subapps upon creating them.

## Alternative
An alternative to this would be to make the task pools global, as seen in #2250 or bevyengine/rfcs#54.
2022-05-30 16:59:43 +00:00
..
src Copy TaskPool resoures to subapps (#4792) 2022-05-30 16:59:43 +00:00
Cargo.toml Copy TaskPool resoures to subapps (#4792) 2022-05-30 16:59:43 +00:00