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?
Thread Synchronization in C#
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Mamta MRank #268 · 9.4K reputationPosted Feb 28, 2012, 8:35 PM EST
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
Sam HobbsRank #107 · 20.5K reputationPosted Feb 28, 2012, 9:20 PM EST
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.