bevy/crates/bevy_app/src
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
..
app.rs Copy TaskPool resoures to subapps (#4792) 2022-05-30 16:59:43 +00:00
ci_testing.rs Fix formatting, spelling, phrasing and consistency (#4275) 2022-04-05 22:36:02 +00:00
lib.rs Fix formatting, spelling, phrasing and consistency (#4275) 2022-04-05 22:36:02 +00:00
plugin_group.rs fix re-adding a plugin to a plugin group (#2039) 2022-05-09 13:06:22 +00:00
plugin.rs Fix formatting, spelling, phrasing and consistency (#4275) 2022-04-05 22:36:02 +00:00
schedule_runner.rs Fix formatting, spelling, phrasing and consistency (#4275) 2022-04-05 22:36:02 +00:00