// WaitDelegate public void Compute(Object o) { SubFib sfLocal = (SubFib)o; sfLocal.iRet = fib(sfLocal.iFibon); Console.Write("({0}) ", sfLocal.iFibon); Console.WriteLine("Fibonacci2.Compute({0})={1}", sfLocal.iFibon, sfLocal.iRet); }
// WaitOrTimerDelegate public void Check(Object o, bool zTimex) { SubFib sfLocal = (SubFib)o; sfLocal.iCheckFlag = 1; Console.Write("({0}) ", sfLocal.iFibon); // iFlag=1; Console.WriteLine("Fibonacci2, {0}", ((zTimex)?"timer expired":"wait signalled")); if (!zTimex) { Compute(o); } }