bevy/crates
Mike e1b0bbf5ed Stageless: add a method to scope to always run a task on the scope thread (#7415)
# Objective

- Currently exclusive systems and applying buffers run outside of the multithreaded executor and just calls the funtions on the thread the schedule is running on. Stageless changes this to run these using tasks in a scope. Specifically It uses `spawn_on_scope` to run these. For the render thread this is incorrect as calling `spawn_on_scope` there runs tasks on the main thread. It should instead run these on the render thread and only run nonsend systems on the main thread.
 
## Solution

- Add another executor to `Scope` for spawning tasks on the scope. `spawn_on_scope` now always runs the task on the thread the scope is running on. `spawn_on_external` spawns onto the external executor than is optionally passed in. If None is passed `spawn_on_external` will spawn onto the scope executor.
- Eventually this new machinery will be able to be removed. This will happen once a fix for removing NonSend resources from the world lands. So this is a temporary fix to support stageless.

---

## Changelog

- add a spawn_on_external method to allow spawning on the scope's thread or an external thread

## Migration Guide

> No migration guide. The main thread executor was introduced in pipelined rendering which was merged for 0.10. spawn_on_scope now behaves the same way as on 0.9.
2023-02-05 21:44:46 +00:00
..
bevy_animation Fix minor typos in code and docs (#7378) 2023-01-27 12:12:53 +00:00
bevy_app Remove App::add_sub_app (#7290) 2023-01-24 21:24:25 +00:00
bevy_asset update winit to 0.28 (#7480) 2023-02-03 16:41:39 +00:00
bevy_audio AudioOutput is actually a normal resource now, not a non-send resource (#7262) 2023-01-18 17:20:26 +00:00
bevy_core Increment FrameCount in CoreStage::Last. (#7477) 2023-02-02 21:06:29 +00:00
bevy_core_pipeline Extract component derive (#7399) 2023-01-30 18:12:16 +00:00
bevy_derive update winit to 0.28 (#7480) 2023-02-03 16:41:39 +00:00
bevy_diagnostic Rename dynamic feature (#7340) 2023-01-23 14:28:00 +00:00
bevy_dylib Rename dynamic feature (#7340) 2023-01-23 14:28:00 +00:00
bevy_dynamic_plugin Adapt path type of dynamically_load_plugin (#6734) 2022-12-05 23:39:43 +00:00
bevy_ecs Stageless: add a method to scope to always run a task on the scope thread (#7415) 2023-02-05 21:44:46 +00:00
bevy_ecs_compile_fail_tests Fix clippy lints and failed test with Rust 1.66 (#6945) 2022-12-15 18:05:15 +00:00
bevy_encase_derive add helper for macro to get either bevy::x or bevy_x depending on how it was imported (#7164) 2023-01-11 21:12:02 +00:00
bevy_gilrs Gamepad events refactor (#6965) 2023-01-09 19:24:52 +00:00
bevy_gltf enum Visibility component (#6320) 2022-12-25 00:39:29 +00:00
bevy_hierarchy Add ReplaceChildren and ClearChildren EntityCommands (#6035) 2023-01-16 21:24:15 +00:00
bevy_input Reduce internal system order ambiguities, and add an example explaining them (#7383) 2023-01-31 01:47:00 +00:00
bevy_internal update winit to 0.28 (#7480) 2023-02-03 16:41:39 +00:00
bevy_log Fix suppression of all console logs when trace_tracy is enabled (#6955) 2022-12-20 23:45:43 +00:00
bevy_macro_utils Update toml_edit to 0.18 (#7370) 2023-01-26 18:09:43 +00:00
bevy_math Improve code/comments for Ray::intersect_plane and its tests (#6823) 2022-12-05 22:49:06 +00:00
bevy_mikktspace Release 0.9.0 (#6568) 2022-11-12 20:01:29 +00:00
bevy_pbr Better cascades config defaults + builder, tweak example configs (#7456) 2023-02-05 08:06:32 +00:00
bevy_ptr Fix minor typos in code and docs (#7378) 2023-01-27 12:12:53 +00:00
bevy_reflect Follow up on Todo in bevy_reflect_derive (#7461) 2023-02-02 04:37:32 +00:00
bevy_reflect_compile_fail_tests Enable deriving Reflect on structs with generic types (#7364) 2023-01-28 00:12:06 +00:00
bevy_render add OpenGL and DX11 backends (#7481) 2023-02-04 23:20:20 +00:00
bevy_scene bevy_ecs: ReflectComponentFns without World (#7206) 2023-02-03 05:53:58 +00:00
bevy_sprite set cull mode: None for Mesh2d (#7514) 2023-02-05 17:59:39 +00:00
bevy_tasks Stageless: add a method to scope to always run a task on the scope thread (#7415) 2023-02-05 21:44:46 +00:00
bevy_text Allow users of Text/TextBundle to choose from glyph_brush_layout's BuiltInLineBreaker options. (#7283) 2023-01-21 00:17:11 +00:00
bevy_time re-enable tests on apple silicon (#7400) 2023-01-28 19:00:27 +00:00
bevy_transform Reduce internal system order ambiguities, and add an example explaining them (#7383) 2023-01-31 01:47:00 +00:00
bevy_ui Don't ignore UI scale for text (#7510) 2023-02-05 18:15:22 +00:00
bevy_utils Fix minor typos in code and docs (#7378) 2023-01-27 12:12:53 +00:00
bevy_window update winit to 0.28 (#7480) 2023-02-03 16:41:39 +00:00
bevy_winit Replace RemovedComponents<T> backing with Events<Entity> (#5680) 2023-02-04 20:53:37 +00:00