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

wait for render app when main world is dropped #11737

Merged
merged 4 commits into from
Feb 8, 2024

Conversation

hymm
Copy link
Contributor

@hymm hymm commented Feb 6, 2024

Objective

  • Try not to drop the render world on the render thread, and drop the main world after the render world.
  • The render world has a drop check that will panic if it is dropped off the main thread.

Solution

  • Keep track of where the render world is and wait for it to come back when the channel resource is dropped.

Changelog

  • Wait for the render world when the main world is dropped.

Migration Guide

  • If you were using the pipelined rendering channels, MainToRenderAppSender and RenderToMainAppReceiver, they have been combined into the single resource RenderAppChannels.

@hymm hymm changed the title wait for render app when channels are dropped wait for render app when main world is dropped Feb 6, 2024
@james7132 james7132 added A-Rendering Drawing game state to the screen P-Crash A sudden unexpected crash C-Bug An unexpected or incorrect behavior M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide labels Feb 6, 2024
Copy link
Contributor

github-actions bot commented Feb 6, 2024

It looks like your PR is a breaking change, but you didn't provide a migration guide.

Could you add some context on what users should update when this change get released in a new version of Bevy?
It will be used to help writing the migration guide for the version. Putting it after a ## Migration Guide will help it get automatically picked up by our tooling.

@JMS55 JMS55 added this to the 0.13 milestone Feb 7, 2024
Co-authored-by: Friz64 <[email protected]>
@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it labels Feb 8, 2024
Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good comments, and I like the constructor. Once the migration guide is ready I'll press the button.

@hymm
Copy link
Contributor Author

hymm commented Feb 8, 2024

Added the migration guide. Kept it pretty brief as the usage is pretty niche.

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Feb 8, 2024
Merged via the queue into bevyengine:main with commit 76b6666 Feb 8, 2024
24 checks passed
@hymm hymm deleted the wait-for-render-to-drop branch February 11, 2024 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide P-Crash A sudden unexpected crash
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants