all groups > dotnet clr > october 2006 >
You're in the

dotnet clr

group:

Need clarification on Mutex.WaitOne method.


Re: Need clarification on Mutex.WaitOne method. Jon Shemitz
10/31/2006 2:00:28 PM
dotnet clr: [quoted text, click to view]

Yes.

[quoted text, click to view]

No. The boolean parameter is for use with a ContextBoundObject. That's
a complex subject, and odds are good that you'd know if you were using
a ContextBoundObject if you were.

--

..NET 2.0 for Delphi Programmers www.midnightbeach.com/.net
Re: Need clarification on Mutex.WaitOne method. Jon Shemitz
10/31/2006 3:03:04 PM
Grr.

[quoted text, click to view]

s/b "odds are good that you'd know you were using a ContextBoundObject
if you were."


--

..NET 2.0 for Delphi Programmers www.midnightbeach.com/.net
Need clarification on Mutex.WaitOne method. Ken Varn
10/31/2006 4:49:31 PM
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
-----------------------------------

AddThis Social Bookmark Button