Windows Programming Question:

What is Mutex Object and why it is used?

Tweet Share WhatsApp

Answer:

A mutex object is a synchronization object whose state is set to signaled when it is not owned by any thread, and non-signaled when it is owned. For example, to prevent two threads from writing to shared memory at the same time, each thread waits for ownership of a mutex object before executing the code that accesses the memory. After writing to the shared memory, the thread releases the mutex object.

Download Windows Programming PDF Read All 30 Windows Programming Questions
Previous QuestionNext Question
How the handles are handled in the child process?What is a thread?