예제 #1
0
        //	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);
        }
예제 #2
0
        //	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);
            }
        }