---
title: "What Is CMutex ?"  
description: "What Is CMutex ?"  
author: "Dependra Pathak"  
published: 2011-03-28  
updated: 2020-09-16  
canonical: https://www.mindstick.com/interview/671/what-is-cmutex  
category: "visual c++"  
tags: ["visual c++"]  
reading_time: 1 minute  

---

# What Is CMutex ?

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.

## Answers

### Answer by Dependra Pathak

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.


---

Original Source: https://www.mindstick.com/interview/671/what-is-cmutex

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
