Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copy TaskPool resoures to subapps (bevyengine#4792)
# Objective Fixes bevyengine#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 bevyengine#2250 or bevyengine/rfcs#54.
- Loading branch information