Determining mutex state

  • Thread starter Thread starter Nicholas Paldino [.NET/C# MVP]
  • Start date Start date
N

Nicholas Paldino [.NET/C# MVP]

Elad,

There are overloads of the WaitOne method which take a parameter for the
timeout. You can just set this to zero. If the mutex is not set, then it
will return immediately, returning false, indicating that it did not receive
the signal.

Hope this helps.
 
Hi,

Is there a way of determining whether a Mutex is signaled or not without
using Mutex.WaitOne() which blocks the thread if the Mutex currently has an
owner?

Thanks.
 
Lovely. Thanks.

Nicholas Paldino said:
Elad,

There are overloads of the WaitOne method which take a parameter for
the timeout. You can just set this to zero. If the mutex is not set, then
it will return immediately, returning false, indicating that it did not
receive the signal.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Elad said:
Hi,

Is there a way of determining whether a Mutex is signaled or not without
using Mutex.WaitOne() which blocks the thread if the Mutex currently has
an owner?

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

ThreadPool and WaitHandle 1
Disposed Mutex Behavior 1
broken mutexing attempt 2
Is Mutex Owned? 13
Mutex access denied 2
processes and mutexes 3
killing a process owning a system mutex 2
Mutex - Singleton Help 1

Back
Top