News for hackers. Stuff that matters.
Re:Threads Are a Bad Idea for Most Purposes (1995) [pdf] by int_19h on Tuesday January 28, 2020 @07:57PM (#22176024)
Win32 message queues are not only relevant to the GUI subsystem. Note how PostThreadMessage doesn't even deal with HWNDs anywhere. And COM, for example, uses those same message queues for cross-apartment calls - even if it's one GUI-less service calling another one, there's a message pump in there somewhere.
Re:Threads Are a Bad Idea for Most Purposes (1995) [pdf] by dfox on Tuesday January 28, 2020 @08:38PM (#22176299)
I somewhat believe that the sole reason for existence of PostThreadMessage and friends is to make COM cross-apartment calls work for threads that do not own any windows. You can probably devise other uses for that, but such uses still somewhat boil down to implementing your own COM-like bidirectional IPC mechanism (GIMP's libwire comes to mind, which does essentially the same thing on top of “anything that behaves like SOCK_STREAM socket” and shared temporary directory)