#AutoResetEvent Vs ManualReset Event

Scenario : Lets assume there are two threads waiting to access a resource/ CS.We are using Signaling mechanism.

AutoResetEvent : Only one thread out of the two will be allowed,once signal is received.

ManualResetEvent : All the threads which have been in halt will be allowed once signal is received. To prevent this you must invoke a method called Reset Manually.

Rule of Thumb: For every waitone,there must be a corresponding set.




Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s