Skip to content

fix: exiting the event loop#14

Open
ThePoultryMan wants to merge 2 commits intomecha-org:mainfrom
ThePoultryMan:fix/app-exit
Open

fix: exiting the event loop#14
ThePoultryMan wants to merge 2 commits intomecha-org:mainfrom
ThePoultryMan:fix/app-exit

Conversation

@ThePoultryMan
Copy link

Objective

Currently, if the bevy app exits, the program will hang because the event loop is never exited.

Solution

Fixed by checking if the bevy app has an exit signal, and breaking the event loop if it does.

Testing

  • Tested on my own app.
  • Tested on both examples.

Migration Guide

Technically there are no breaking changes, however, for consistency with using bevy apps, instead of using std::process::exit, users should use the EventWriter<AppExit> instead.

Both examples have been updated to account for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant