Need clarification on Mutex.WaitOne method.

Tech-Archive recommends: Speed Up your PC by fixing your registry



If I have a thread that calls WaitOne() on a Mutex object with no arguments,
is the Mutex owned by the calling thread once the WaitOne() call returns?

The documentation states that when no arguments are passed to WaitOne() that
it translates to a WaitOne(-1,false) call.

I am confused about the bool argument of the Mutex. If false is passed to a
WaitOne call, is the mutex then acquired by the calling thread or does it
just indicate that the mutex is now free, but not acquired?



--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------


.



Relevant Pages

  • Re: Need clarification on Mutex.WaitOne method.
    ... is the Mutex owned by the calling thread once the WaitOne() call returns? ... The boolean parameter is for use with a ContextBoundObject. ...
    (microsoft.public.dotnet.framework.clr)
  • Re: Ereignis in existierender Programminstanz auslösen
    ... >> dass nach WaitOne der Mutex wieder frei wird und das Programm ... Nun erstelle ich also einen Thread, ... Next by Date: ...
    (microsoft.public.de.german.entwickler.dotnet.vb)
  • =?Windows-1252?Q?Re:_Ereignis_in_existierender_Programminstanz_ausl=F6sen?=
    ... Du kannst einen Mutex als Ereignis benutzen, ... Du in einem Thread des Clients mit WaitOne darauf wartest und nach WaitOne eine CallBack-Funktion aufrufst und den Mutex wieder zurücksetzt. ...
    (microsoft.public.de.german.entwickler.dotnet.vb)
  • RE: Mutex - Singleton Help
    ... > creates a newly named Mutex. ... It then calls WaitOne and determines whether it ... > why the WaitOne does not receive any messages, also the timespan is set to ... > zero, how can the mutex determine if any messages have been recieved in zero ...
    (microsoft.public.dotnet.general)
  • Mutex - Singleton Help
    ... creates a newly named Mutex. ... It then calls WaitOne and determines whether it ... why the WaitOne does not receive any messages, also the timespan is set to ... zero, how can the mutex determine if any messages have been recieved in zero ...
    (microsoft.public.dotnet.general)