public void WaitTest() { var thin = new ThinEvent(); Task.Factory.StartNew(() => { Thread.Sleep(1000); thin.Set(); if (IsDebugEnabled) { log.Debug("Set event..."); } }); if (IsDebugEnabled) { log.Debug("Wait event set..."); } thin.Wait(); if (IsDebugEnabled) { log.Debug("set event is completed..."); } }
public void WaitTest() { var thin = new ThinEvent(); Task.Factory.StartNew(() => { Thread.Sleep(1000); thin.Set(); if(IsDebugEnabled) log.Debug("Set event..."); }); if(IsDebugEnabled) log.Debug("Wait event set..."); thin.Wait(); if(IsDebugEnabled) log.Debug("set event is completed..."); }