Hi friends,
I want to know that how do we implement thread synchronization such as object.Wait, Notify,and CriticalSection in C#? If anyone knows then please give an explanation about it?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sam HobbsPosted Feb 29, 2012, 2:20 AM
The AutoResetEvent, ManualResetEvent and related classes provide events.
I do not know what a Notify is that is for synchronization. There is nothing in the Windows API for synchronization called notify. There are notification messages but they provide no advantage compared to other messages.
The C# lock statement "marks a statement block as a critical section". I think there are other ways to to use a critical section in C# and I am confident you will find them. The Monitor class is for reference types.
Mamta MPosted Feb 29, 2012, 1:35 AM
Check the articles given on the right side of this page.
Also check this, it's a brilliant link:
http://msdn.microsoft.com/en-us/library/w1w6424a%28v=vs.80%29.aspx