I hate the WIN##API. I'm getting so much conflicting data that I have no choice other than asking.

I'll save you most of the life story, but I'll post some source if my question/explanation isn't clear enough.

The question: is there some magic to the Windows OS message queuing implementation that prevents race conditions?

My understanding is that `WndProc' must be reentrant. You must code under the assumption that basically any message may start processing while basically any message is processing.

Much of the evidence I've found suggests that it is magic. (The evidence being all the readily available source that transforms shared state without any sort of synchronization as part of processing user defined messages (`WM_USER'). I'm not just talking about example programs either.)

Forgive the naïve question, but I'm pulling out some of my old stuff for an open source project and I can only imagine that it will randomly crash depending on the phases of the moon. (I didn't do any synchronization for several messages that seem very likely to process "at the same time".)

Soma