bevy/crates
Mike ff7d5ff444 Stageless: close the finish channel so executor doesn't deadlock (#7448)
# Objective

- Fix panic_when_hierachy_cycle test hanging
- The problem is that the scope only awaits one task at a time in get_results. In stageless this task is the multithreaded executor. That tasks hangs when a system panics and cannot make anymore progress. This wasn't a problem before because the executor was spawned after all the system tasks had been spawned. But in stageless the executor is spawned before all the system tasks are spawned.

## Solution

- We can catch unwind on each system and close the finish channel if one panics. This then causes the receiver end of the finish channel to panic too.
- this might have a small perf impact, but when running many_foxes it seems to be within the noise. So less than 40us.

## Other possible solutions

- It might be possible to fairly poll all the tasks in get_results in the scope. If we could do that then the scope could panic whenever one of tasks panics. It would require a data structure that we could both poll the futures through a shared ref and also push to it. I tried FuturesUnordered, but it requires an exclusive ref to poll it.
- The catch unwind could be moved onto when we create the tasks for scope instead. We would then need something like a oneshot async channel to inform get_results if a task panics.
2023-02-03 07:16:02 +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 Remove unnecessary Default impl of HandleType (#7472) 2023-02-02 15:09:06 +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 Fix ndk-macro link (#7027) 2022-12-25 05:06:03 +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: close the finish channel so executor doesn't deadlock (#7448) 2023-02-03 07:16:02 +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 Docs: DefaultPlugins vs. MinimalPlugins and ScheduleRunnerPlugin (#7226) 2023-01-24 05:25:03 +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 Reduce internal system order ambiguities, and add an example explaining them (#7383) 2023-01-31 01:47:00 +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 Stageless: move MainThreadExecutor to schedule_v3 (#7444) 2023-02-03 03:19:41 +00:00
bevy_scene bevy_ecs: ReflectComponentFns without World (#7206) 2023-02-03 05:53:58 +00:00
bevy_sprite Wgpu 0.15 (#7356) 2023-01-29 20:27:30 +00:00
bevy_tasks Fix minor typos in code and docs (#7378) 2023-01-27 12:12:53 +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 change the default width and height of Size to Val::Auto (#7475) 2023-02-03 01:35:06 +00:00
bevy_utils Fix minor typos in code and docs (#7378) 2023-01-27 12:12:53 +00:00
bevy_window add Input Method Editor support (#7325) 2023-01-29 20:27:29 +00:00
bevy_winit Reduce internal system order ambiguities, and add an example explaining them (#7383) 2023-01-31 01:47:00 +00:00