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. SetEvent?

SetEvent?

Scheduled Pinned Locked Moved C / C++ / MFC
data-structurestutorialquestionworkspace
5 Posts 4 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.
  • M Offline
    M Offline
    MCA
    wrote on last edited by
    #1

    Does the SetEvent function queue events? For example, if I signal the event 10 times in a row, will a waiting thread wakeup from a waitforsingleobject 10 times? The event is setup as automatic. Thanks in Advance...

    R S B 3 Replies Last reply
    0
    • M MCA

      Does the SetEvent function queue events? For example, if I signal the event 10 times in a row, will a waiting thread wakeup from a waitforsingleobject 10 times? The event is setup as automatic. Thanks in Advance...

      R Offline
      R Offline
      Renjith Ramachandran
      wrote on last edited by
      #2

      No the thread will wakeup in the first time itself. the significance of a singal is in waiting state only. Ninety-eight percent of the thrill comes from knowing that the thing you designed works, and works almost the way you expected it would. If that happens, part of you is in that machine.

      1 Reply Last reply
      0
      • M MCA

        Does the SetEvent function queue events? For example, if I signal the event 10 times in a row, will a waiting thread wakeup from a waitforsingleobject 10 times? The event is setup as automatic. Thanks in Advance...

        S Offline
        S Offline
        S Senthil Kumar
        wrote on last edited by
        #3

        No, SetEvent just sets the event to the signalled state, so the number of times you call SetEvent doesn't matter. Regards Senthil _____________________________ My Blog | My Articles | WinMacro

        1 Reply Last reply
        0
        • M MCA

          Does the SetEvent function queue events? For example, if I signal the event 10 times in a row, will a waiting thread wakeup from a waitforsingleobject 10 times? The event is setup as automatic. Thanks in Advance...

          B Offline
          B Offline
          Bob Ciora
          wrote on last edited by
          #4

          Try a semaphore if this is the desired behavior. Bob Ciora

          M 1 Reply Last reply
          0
          • B Bob Ciora

            Try a semaphore if this is the desired behavior. Bob Ciora

            M Offline
            M Offline
            MCA
            wrote on last edited by
            #5

            Thanks - Semaphore works great. Thanks for the info... Regards.

            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