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. C / C++ / MFC
  4. WaitForMultipleObjects()..

WaitForMultipleObjects()..

Scheduled Pinned Locked Moved C / C++ / MFC
help
4 Posts 2 Posters 0 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.
  • L Offline
    L Offline
    Laing James
    wrote on last edited by
    #1

    Hi. I have an application where I use WaitForMultipleObjects() to wait for any one ( ie) 'any of' not all ), of a number of events to become signalled. However, the maximum number of events that I can wait on in a single call to WaitForMultipleObjects is 64. I need to be able to wait on more than 64. I know that I could create groups of 64 and loop through them with a timeout until I get one of the events signalled. But, I cannot afford the time waiting for a timeout to occur, however small. If anyone has an idea of how I could get around this I would appreciate the help. James.

    G 1 Reply Last reply
    0
    • L Laing James

      Hi. I have an application where I use WaitForMultipleObjects() to wait for any one ( ie) 'any of' not all ), of a number of events to become signalled. However, the maximum number of events that I can wait on in a single call to WaitForMultipleObjects is 64. I need to be able to wait on more than 64. I know that I could create groups of 64 and loop through them with a timeout until I get one of the events signalled. But, I cannot afford the time waiting for a timeout to occur, however small. If anyone has an idea of how I could get around this I would appreciate the help. James.

      G Offline
      G Offline
      gokings
      wrote on last edited by
      #2

      Would it be possible to have multiple threads waiting? Each thread would wait for no more than 64 events.

      L 1 Reply Last reply
      0
      • G gokings

        Would it be possible to have multiple threads waiting? Each thread would wait for no more than 64 events.

        L Offline
        L Offline
        Laing James
        wrote on last edited by
        #3

        Thank you for the reply. I had thought of that, but again I did not want to compromise the throughput speed that the application currently delivers. But, I have been thinking about this all night and I cannot think of another solution that would 'scale' as well as your suggestion. So, it looks like thats the road I will have to take. Best regards. And again, thank you for the reply. James.

        L 1 Reply Last reply
        0
        • L Laing James

          Thank you for the reply. I had thought of that, but again I did not want to compromise the throughput speed that the application currently delivers. But, I have been thinking about this all night and I cannot think of another solution that would 'scale' as well as your suggestion. So, it looks like thats the road I will have to take. Best regards. And again, thank you for the reply. James.

          L Offline
          L Offline
          Laing James
          wrote on last edited by
          #4

          After much deliberation and study of my code, I have decided to abandon the idea of trying to handle more than 64 events. It is just not possible to integrate multiple threads, each waiting on a set of 64 events. I need to be able to maintain the current application throughput and the overhead would be too much. The list of events that I wait on is not constant and is waited on upto 3000 times per second. The intended user will just have to deal with the limitation. So thats that.

          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