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

[Merged by Bors] - Make WinitWindows non send #4027

Closed
wants to merge 1 commit into from

Conversation

aevyrie
Copy link
Member

@aevyrie aevyrie commented Feb 23, 2022

Objective

Solution

  • Make the WinitWindows resource !Send.
  • This ensures that any systems that use WinitWindows must either be exclusive (run on the main thread), or the resource is explicitly marked with the NonSend parameter in user systems.

@alice-i-cecile
Copy link
Member

Checks out, and the comments are very helpful.

@alice-i-cecile alice-i-cecile added A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior and removed S-Needs-Triage This issue needs to be labelled labels Feb 23, 2022
@cart
Copy link
Member

cart commented Feb 24, 2022

bors r+

bors bot pushed a commit that referenced this pull request Feb 24, 2022
# Objective

- Fixes #4010, as well as any similar issues in this class.
- Winit functions used outside of the main thread can cause the application to unexpectedly hang.

## Solution

- Make the `WinitWindows` resource `!Send`.
- This ensures that any systems that use `WinitWindows` must either be exclusive (run on the main thread), or the resource is explicitly marked with the `NonSend` parameter in user systems.
@bors bors bot changed the title Make WinitWindows non send [Merged by Bors] - Make WinitWindows non send Feb 24, 2022
@bors bors bot closed this Feb 24, 2022
kurtkuehnert pushed a commit to kurtkuehnert/bevy that referenced this pull request Mar 6, 2022
# Objective

- Fixes bevyengine#4010, as well as any similar issues in this class.
- Winit functions used outside of the main thread can cause the application to unexpectedly hang.

## Solution

- Make the `WinitWindows` resource `!Send`.
- This ensures that any systems that use `WinitWindows` must either be exclusive (run on the main thread), or the resource is explicitly marked with the `NonSend` parameter in user systems.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Window intermittently crashes on Windows 10 & 11 on startup if setting a Window Icon using Winit
3 participants