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.

Run single instance of an application using Mutex

In order to allow only a single instance of an application running I'm using mutex. The code is given below. …

c# mutex
Boost Mutex Scoped Lock

I was reading through a Boost Mutex tutorial on drdobbs.com, and found this piece of code: #include <boost/…

c++ multithreading boost mutex scoped-lock
Are Mutexes needed in javascript?

I have seen this link: Implementing Mutual Exclusion in JavaScript. On the other hand, I have read that there are …

javascript multithreading mutex
Is it possible to use mutex in multiprocessing case on Linux/UNIX ?

This is an interview question. Is it possible to use mutex in multiprocessing case on Linux/UNIX ? My idea: No, …

multithreading synchronization mutex multiprocessing semaphore
When to use recursive mutex?

I understand recursive mutex allows mutex to be locked more than once without getting to a deadlock and should be …

c++ multithreading recursion mutex recursive-mutex
WPF Single Instance Best Practices

This is the code I implemented so far to create a single instance WPF application: #region Using Directives using System; …

c# wpf singleton mutex
Calling pthread_cond_signal without locking mutex

I read somewhere that we should lock the mutex before calling pthread_cond_signal and unlock the mutex after calling …

c++ pthreads mutex signals condition-variable
How to use QMutex?

I'm newbie to Qt and I'm looking for multi-threading in Qt. As I learned in Qt Documents, I defined two …

c++ multithreading qt mutex qmutex
How are mutexes implemented?

Are some implementations better than others for specific applications? Is there anything to earn by rolling out your own?

language-agnostic concurrency mutex
Static pthreads mutex initialization

Using pthreads, how would one, in C, initialize a static array of mutexes? For a single static mutex, it seems …

c pthreads mutex static-initialization