Skip to content

Any documentation about the main thread? #3561

Answered by FabianLars
moxaj asked this question in Q&A
Discussion options

You must be logged in to vote

What is the purpose of the main thread?

Some stuff must run on main thread, some stuff must run on a non-main thread. Also, the main thread should be slightly faster (no context switching or whatever).
The main thing to have in mind is that doing something blocking in commands which run on the main thread will also block the UI (which also runs on the main thread). So i guess you could say async commands (or sync command annotated with #[command(async)]) are generally the safer bet 🤷

That said the frozen window sounds like a bug. So if you can i'd appreciate if you can create an issue for it with a minimal reproduction repo 🙏

window management HAD to be done on the main thread

Actuall…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@moxaj
Comment options

@FabianLars
Comment options

@moxaj
Comment options

@JonasKruckenberg
Comment options

@moxaj
Comment options

Answer selected by moxaj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants