Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redundant AppExit event checking in ScheduleRunnerPlugin #9420

Closed
BigWingBeat opened this issue Aug 11, 2023 · 1 comment · Fixed by #9421
Closed

Redundant AppExit event checking in ScheduleRunnerPlugin #9420

BigWingBeat opened this issue Aug 11, 2023 · 1 comment · Fixed by #9421
Labels
A-App Bevy apps and plugins C-Bug An unexpected or incorrect behavior

Comments

@BigWingBeat
Copy link
Contributor

Bevy version

0.11

Description

While looking through Bevy's source code, I noticed that the ScheduleRunnerPlugin is checking for AppExitEvents twice in the main loop - once immediately before calling App.update() and once immediately after. Meanwhile, the main loop of the WinitPlugin only does this check once in the main loop, a bit after calling App.update().

As the WinitPlugin is only checking for AppExit events once per loop, I believe that means the extra check in ScheduleRunnerPlugin is redundant and unneccessary (Or if it somehow is necessary, it's completely undocumented). The secondary check was added in this commit, if it's any help.

@BigWingBeat BigWingBeat added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Aug 11, 2023
@alice-i-cecile alice-i-cecile added A-App Bevy apps and plugins and removed S-Needs-Triage This issue needs to be labelled labels Aug 11, 2023
@alice-i-cecile
Copy link
Member

Let's get a PR open for this and do some testing? This definitely looks redundant to me.

github-merge-queue bot pushed a commit that referenced this issue Aug 28, 2023
…#9421)

# Objective

Fixes #9420

## Solution

Remove one of the two `AppExit` event checks in the
`ScheduleRunnerPlugin`'s main loop. Specificially, the check that
happens immediately before calling `App.update()`, to be consistent with
the `WinitPlugin`.
rdrpenguin04 pushed a commit to rdrpenguin04/bevy that referenced this issue Jan 9, 2024
…bevyengine#9421)

# Objective

Fixes bevyengine#9420

## Solution

Remove one of the two `AppExit` event checks in the
`ScheduleRunnerPlugin`'s main loop. Specificially, the check that
happens immediately before calling `App.update()`, to be consistent with
the `WinitPlugin`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-App Bevy apps and plugins C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants