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

Creating EventLoop multiple times is not supported. #2885

Closed
andrewbaxter opened this issue Jun 17, 2023 · 2 comments
Closed

Creating EventLoop multiple times is not supported. #2885

andrewbaxter opened this issue Jun 17, 2023 · 2 comments
Labels
S - enhancement Wouldn't this be the coolest?

Comments

@andrewbaxter
Copy link

This restriction isn't strictly necessary on all platforms, but is imposed to eliminate any nasty surprises when porting to platforms that require it.

Porting isn't always necessary, and restarting the event loop allows developers to avoid having to serialize and deserialize state and manage subprocesses and binary paths.

Using a platform-specific library other than winit isn't a great option either, even if there is one using it would mean throwing away the entire ecosystem built on winit.

@daxpedda daxpedda added the S - enhancement Wouldn't this be the coolest? label Jun 17, 2023
@rib
Copy link
Contributor

rib commented Jun 22, 2023

I think this can be considered a duplicate of #2431

The pump_events branch adds a run_ondemand API that allows the event loop to be run, then exit and then be re-run again: #2767

@daxpedda
Copy link
Member

I agree.

Closing in favor of #2431.

@daxpedda daxpedda closed this as not planned Won't fix, can't repro, duplicate, stale Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S - enhancement Wouldn't this be the coolest?
Development

No branches or pull requests

3 participants