Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / May 2004

Tip: Looking for answers? Try searching our database.

threading synchronization question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jim - 09 May 2004 19:59 GMT
Hi,

I have a question regarding the Event classes. The ManualResetEvent class
exposes the WaitOne(int,bool) method.
Now I am familiar with threading, events, mutexes, synchronization issues,
etc, but I am still baffled by the second parameter to this method. This is
what the MSDN documentation says about the bool parameter to WaitOne:

"exitContext: true to exit the synchronization domain for the context before
the wait (if in a synchronized context), and reacquire it; otherwise, false"

Can anyone explain in english what this means? Perhaps with an example?

Thanks!

-Jim
Natty Gur - 10 May 2004 07:47 GMT
Hi,
if you aplay synchronization to class only one thread can be executing
in all contexts that share an instance of this property. if you are
using WaitOne your thread will be blocked. in that case you might want
to exit the synchronization domain and let other threads using that
class.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/h
tml/frlrfsystemruntimeremotingcontextssynchronizationattributeclasstopic
.asp

HTH

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.