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. Event or Mutex

Event or Mutex

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
3 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.
  • P Offline
    P Offline
    Prakash Nadar
    wrote on last edited by
    #1

    What is the exact differece between event and mutex w.r.t thread syncronization. I found that they can be used interchangably so where excatly is the difference. If possiable can any one give an example where event will be used and where mutex can be used. thanx in advance. Prakash. My God is more powerfull Than Your God. (the line that divides the world)

    K 1 Reply Last reply
    0
    • P Prakash Nadar

      What is the exact differece between event and mutex w.r.t thread syncronization. I found that they can be used interchangably so where excatly is the difference. If possiable can any one give an example where event will be used and where mutex can be used. thanx in advance. Prakash. My God is more powerfull Than Your God. (the line that divides the world)

      K Offline
      K Offline
      Killen
      wrote on last edited by
      #2

      Events can be fired by lots of different threads at the same time, I think, whereas a mutex is something owned by one thread only. So when a thread is waiting for an event, it can be fired by more or less any other thread, whereas if it is waiting for a mutex, it is one specific thread that releases it. "Time to give a Newtonian demonstration, of a bullet, its mass and its acceleration." -Stephen Hawking the gangsta rapper

      P 1 Reply Last reply
      0
      • K Killen

        Events can be fired by lots of different threads at the same time, I think, whereas a mutex is something owned by one thread only. So when a thread is waiting for an event, it can be fired by more or less any other thread, whereas if it is waiting for a mutex, it is one specific thread that releases it. "Time to give a Newtonian demonstration, of a bullet, its mass and its acceleration." -Stephen Hawking the gangsta rapper

        P Offline
        P Offline
        Prakash Nadar
        wrote on last edited by
        #3

        They say that it takes a pinch of salt to make the food tasty thats what you did. Thanx a lot, now i specifically understood where i can use mutex and where events thanx again ":-) My God is more powerfull Than Your God. (the line that divides the world)

        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