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

How to use with tokio or mio? #2390

Open
danaugrs opened this issue Jul 23, 2022 · 2 comments
Open

How to use with tokio or mio? #2390

danaugrs opened this issue Jul 23, 2022 · 2 comments

Comments

@danaugrs
Copy link

danaugrs commented Jul 23, 2022

What's the best way to use winit with tokio or mio?

Related threads:
#1199
tokio-rs/mio#1082

@danaugrs danaugrs changed the title How to use with mio? How to use with tokio or mio? Jul 23, 2022
@notgull
Copy link
Member

notgull commented Aug 11, 2022

If I were doing it, I would run the event loop, but also spawn a thread that runs a tokio runtime that receives events from the main loop via an mpsc channel. You could select! between operating on input from the mpsc channel and whatever other event source you have.

@LukasBombach
Copy link

Related: #1199 (comment)

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

No branches or pull requests

3 participants