Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows API
  4. Thread Message Queue

Thread Message Queue

Scheduled Pinned Locked Moved Windows API
designlinuxdata-structuresquestion
2 Posts 1 Posters 6 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    waldemar sauer aitmetis com
    wrote on last edited by
    #1

    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

    W 1 Reply Last reply
    0
    • W waldemar sauer aitmetis com

      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

      W Offline
      W Offline
      waldemar sauer aitmetis com
      wrote on last edited by
      #2

      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[^]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups