tagged [mutex]

WPF mutex for single app instance not working

WPF mutex for single app instance not working I'm trying to use the mutex method for only allowing one instance of my app to run. That is - I only want a max of one instance for all users on a machine...

21 Mar at 10:12

Using string as a lock to do thread synchronization

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 synchronization. I'm trying to resolve some t...

Synchronizing 2 processes using interprocess synchronizations objects - Mutex or AutoResetEvent

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 anot...

8 Nov at 12:44

Detecting if another instance of the application is already running

Detecting if another instance of the application is already running My application needs to behave slightly differently when it loads if there is already an instance running. I understand how to use a...

How can I create a System Mutex in C#

How can I create a System Mutex in C# How can I create a system/multiprocess Mutex to co-ordinate multiple processes using the same unmanaged resource. Background: I've written a procedure that uses ...

2 Feb at 18:56

Guaranteed yielding with pthread_cond_wait and pthread_cond_signal

Guaranteed yielding with pthread_cond_wait and pthread_cond_signal Assuming I have a C program with 3 POSIX threads, sharing a global variable, mutex, and condition variable, two of which are executin...

Run single instance of an application using Mutex

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. Is this the right way to do it? Are there...

4 May at 11:55

What are the differences between various threading synchronization options in C#?

What are the differences between various threading synchronization options in C#? Can someone explain the difference between: - - - - - I just can't figure it out. It seems to me the first two are the...

What is a mutex?

What is a mutex? A mutex is a programming concept that is frequently used to solve multi-threading problems. My question to the community: What is a mutex and how do you use it?

29 Aug at 15:59