.NET Framework Developer Center > .NET Development Forums > .NET Base Class Library > ReleaseMutex and ManualResetEvent.WaitOne at the same time.
Ask a questionAsk a question
 

AnswerReleaseMutex and ManualResetEvent.WaitOne at the same time.

  • Monday, November 02, 2009 9:50 PMSteveRichter Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I have a queue like object I want to syncronize access to.  Code that receives from the queue will first lock a mutex, check that the queue has entries, then if the queue is empty, both ReleaseMutex the mutex and WaitOne on a ManualResetEvent which is signaled when an item is placed on the queue. 

    Can I atomically ReleaseMutex and Event.WaitOne at the same time?

    thanks,

Answers

All Replies