AutoResetEvent AutoResetEvent myResetEvent =new AutoResetEvent(false); myResetEvent.WaitOne(); //waite other thread1 complete myResetEvent.WaitOne(); //waite other thread2 complete myResetEvent.WaitOne(); run current thread; //in other thread run myResetEvent.Set();
ManualResetEvent ManualResetEvent manualEvent =new ManualResetEvent(false); //waite other thread1 complete manualEvent.WaitOne(); //waite other thread2 complete manualEvent.WaitOne(); run current thread; //in other thread run manualEvent.Set();