#Signaling Mechanism- WaitHandle Abstract Class

WaitHandle :

1.This class is responsible for synchronization using signal mechanism. It is responsible for wrapping kernel Handle Object.

2.Mutex,Semaphore,AutoResetEvent,ManualResetEvent all inherits from WaitHandle.

Important Methods  in WaitHandle :

1.WaitOne : Thread gets blocked if its see waitone method.Thread goes to halt and it will remain in halt unless it receives a signal.Expiration for waiting period can be set with timer option.

2.WaitAll : Collection of WaitHandler method.It is used when all of the items in waithandler array has recived a signal(useful to prevent deadlock ) .

3.WaitAny:Similar to WaitAll,Its a collection of waitHandler  but it waits only for any one of the item in the array to be signalled.

 

 

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 )

Google photo

You are commenting using your Google 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