The Windows main thread could also be spawned as a separate thread from it, but wouldn't that be more likely to break some possible assumptions about the TID of the Windows main thread vs its PID? Or is that not an issue for some reason?
It would need a mechanism to move the Windows TID to the new thread, but that shouldn't be too hard.
(Fwiw I think it would be nice to have this and I was investigating some way to implement in-process compositor with a dedicated thread. On wayland and macOS I was trying to merge this thread with their existing thread, and I ended up figuring that on macOS only the main thread can interact with GUI.)
Yes, hopefully we can have some generic mechanism to do everything in the same thread, so that we don't need to create a dozen extra threads for each process... -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9579#note_128968