Top "Mutex" questions

A mutex ("mutual exclusion") is a mechanism to ensure integrity when the same data or resource is accessed (in particular, changed) concurrently from several threads.

Mutex lock: what does "blocking" mean?

I've been reading up on multithreading and shared resources access and one of the many (for me) new concepts is …

multithreading locking thread-safety mutex blocking
Do pthread mutexes work across threads if in shared memory?

I found this: Fast interprocess synchronization method I used to believe that a pthread mutex can only be shared between …

c++ process mutex shared-memory pthreads
Do I need to lock object when reading from it?

I am writing a program where there is an object shared by multiple threads: A) Multiple write threads write to …

multithreading mutex critical-section
How to find that Mutex in C# is acquired?

How can I find from mutex handle in C# that a mutex is acquired? When mutex.WaitOne(timeout) timeouts, it …

c# synchronization pinvoke mutex handle
C++11: why does std::condition_variable use std::unique_lock?

I am a bit confused about the role of std::unique_lock when working with std::condition_variable. As far …

c++ multithreading c++11 mutex
Should mutexes be mutable?

Not sure if this is a style question, or something that has a hard rule... If I want to keep …

c++ mutex mutable
Synchronizing 2 processes using interprocess synchronizations objects - Mutex or AutoResetEvent

Consider the following scenario: I'm running my application which, during its execution, has to run another process and only after …

c# .net synchronization pinvoke mutex
Using string as a lock to do thread synchronization

While i was looking at some legacy application code i noticed it is using a string object to do thread …

c# multithreading synchronization mutex
Monitor vs Mutex

I read that mutex is a semaphore with value 1 (binary semaphore) used to enforce mutual exclusion. I read this link …

multithreading operating-system mutex semaphore monitor
How to implement a unmanaged thread-safe collection when I get this error: <mutex> is not supported when compiling with /clr

I have a C++ application which consists of unmanaged C++, managed C++ and c#. In the unmanaged part I'm trying …

c++ multithreading thread-safety c++-cli mutex