Home > DeveloperSection > Interviews > What Is CMutex ?

Posted on    March-28-2011 8:39 AM

 Visual C++ Visual C++ 
 1 Answer(s)
  1390  View(s)
Rate this:

Dependra Pathak
Dependra Pathak

Total Post:77

Posted on    March-28-2011 12:00 AM

An object of class CMutex represents a ?mutex? ? a synchronization object that allows one thread mutually exclusive access to a resource. Mutexes are useful when only one thread at a time can be allowed to modify data or some other controlled resource. For example, adding nodes to a linked list is a process that should only be allowed by one thread at a time. By using a CMutex object to control the linked list, only one thread at a time can gain access to the list.

Don't want to miss updates? Please click the below button!

Follow MindStick