6 Feb
2026
6 Feb
'26
12:31 p.m.
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.
I'd have to double check, but I don't think Windows PID/TID even have that relationship. On modern Windows they seem to be more or less random. The more annoying part would be debugging. It's convenient (although, granted, already not always reliable) to see process 01c0 and know its first thread is probably 01c4, and vice versa. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9579#note_128983