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. CRITICAL SECTION AND MUTEX

CRITICAL SECTION AND MUTEX

Scheduled Pinned Locked Moved C / C++ / MFC
4 Posts 4 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.
  • R Offline
    R Offline
    ramina sen
    wrote on last edited by
    #1

    where to use critical section and where to use mutex .. wat is best pratices ..to use this syncronisation elements .

    A R C 3 Replies Last reply
    0
    • R ramina sen

      where to use critical section and where to use mutex .. wat is best pratices ..to use this syncronisation elements .

      A Offline
      A Offline
      Adam Roderick J
      wrote on last edited by
      #2

      I think you read this section to know which to use at what time[^]

      Величие не Бога может быть недооценена.

      1 Reply Last reply
      0
      • R ramina sen

        where to use critical section and where to use mutex .. wat is best pratices ..to use this syncronisation elements .

        R Offline
        R Offline
        Roger Stoltz
        wrote on last edited by
        #3

        For thread synchronization between threads in the same process you should use critical sections as they are faster since they don't have a kernel object associated with them. For synchronization between processes, e.g. when accessing system resources, you have to use mutexes. Mutexes will work in either case. You will find some interesting reading here[^] and here[^].

        "It's supposed to be hard, otherwise anybody could do it!" - selfquote
        "High speed never compensates for wrong direction!" - unknown

        1 Reply Last reply
        0
        • R ramina sen

          where to use critical section and where to use mutex .. wat is best pratices ..to use this syncronisation elements .

          C Offline
          C Offline
          Cool_Dev
          wrote on last edited by
          #4

          critical section can be used to provide synchronization in single process only, so they are faster. Mutex can be used to provide synchronization among different processes..

          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