Thread Message Queue
-
How does the Windows thread message queue work? I can't seem to find good information on this topic anywhere. I had a look at how the Wine project does this, and it looks like they are using a Linux file descriptor (a named pipe, I'm guessing) to implement their message queue. They might have chosen to do their thread queue differently than how MS chose to do it natively, but I'm not sure. My situation: I have a crash dump, and I have a suspicion that the UI thread of this application has a long list of requests that are blocked on the UI thread, waiting to be serviced. So I was hoping that there might be some simple number somewhere in the dump that tells me how many requests are still waiting in queue, or maybe at least some decent way to find that out from within WinDbg. -Waldemar
-
How does the Windows thread message queue work? I can't seem to find good information on this topic anywhere. I had a look at how the Wine project does this, and it looks like they are using a Linux file descriptor (a named pipe, I'm guessing) to implement their message queue. They might have chosen to do their thread queue differently than how MS chose to do it natively, but I'm not sure. My situation: I have a crash dump, and I have a suspicion that the UI thread of this application has a long list of requests that are blocked on the UI thread, waiting to be serviced. So I was hoping that there might be some simple number somewhere in the dump that tells me how many requests are still waiting in queue, or maybe at least some decent way to find that out from within WinDbg. -Waldemar
I didn't get much farther by myself, but I recently ran across a snippet from someone who seems to know what they're doing. The quote is from Jason Schroeder. In case you're wondering how this fits into my original question, I found a stack trace in a dump file that shows that SendMessageW calls NtUserMessageCall. Here is the quote: user32!NtUserMessageCall is just a stub that calls into win32k.sys, so if you want to see what your thread is "really" doing, hook up a kernel debugger... Reference: http://ask.metafilter.com/75491/Why-is-SendMessage-blocking-on-NtUserMessageCall[^]