IEnumerator ProcessCounter(ICounter counter) { WriteLine("*** Counter ***"); yield return(counter.IncCounter(1).WaitHandle); yield return(counter.IncCounter(2).WaitHandle); yield return(counter.IncCounter(3).WaitHandle); var t1 = counter.IncCounter(-1); yield return(t1.WaitHandle); ShowResult(t1, "IncCount(-1)"); var t2 = counter.GetCounter(); yield return(t2.WaitHandle); ShowResult(t2, "GetCounter"); WriteLine(""); }