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. mutex problem

mutex problem

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestionannouncement
3 Posts 3 Posters 8 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
    PV2023
    wrote on last edited by
    #1

    Hello Experts, I just question in mind related to mutex. We have 2 processes P1 and P2 using some global mutex (m1), P1 is having ownership of mutex m1 and P2 is waiting to release mutex m1 by P1 but somehow P1 got died what will happen to P2 process. Please explain.

    L J 2 Replies Last reply
    0
    • P PV2023

      Hello Experts, I just question in mind related to mutex. We have 2 processes P1 and P2 using some global mutex (m1), P1 is having ownership of mutex m1 and P2 is waiting to release mutex m1 by P1 but somehow P1 got died what will happen to P2 process. Please explain.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      It's all explained in the documentation: Mutex Objects - Win32 apps | Microsoft Learn[^].

      1 Reply Last reply
      0
      • P PV2023

        Hello Experts, I just question in mind related to mutex. We have 2 processes P1 and P2 using some global mutex (m1), P1 is having ownership of mutex m1 and P2 is waiting to release mutex m1 by P1 but somehow P1 got died what will happen to P2 process. Please explain.

        J Offline
        J Offline
        jschell
        wrote on last edited by
        #3

        Noting from the design or even architecture perspective anytime code is going to be 'waiting' on something else (thread, process, Rest, message, etc) then one should at least consider what would happen if it never happens. So for example that is why one should consider timeouts. Doesn't mean you should implement that but one needs to at least put some thought into the impact on the application/enterprise if nothing every happens.

        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