rawSetRunMessage() 공개 메소드

public rawSetRunMessage ( IoObject v ) : void
v IoObject
리턴 void
예제 #1
0
        private static IEnumerator Recurse2(IoCoroutine f)
        {
            //yield return null; // just create and quit // 1

            //f.fiber.Yield(f);

            IoCoroutine ccc = IoCoroutine.createObject(IoCLI.state);

            ccc.fiber             = new Fiber();
            ccc.fiber.currentCoro = ccc;
            //yield return
            ccc.fiber.currentRoutine = new FiberProc(IoCLI.Recurse3 /*(ccc)*/);
            if (coro.fiber.State == 4)
            {
                Console.WriteLine("Creation Error. Fiber Exceeds on Recurse 2 " + f.uniqueId);
                IoCLI.yieldingCoros.Remove(f);
                return(null);
            }
            ccc.rawSetResult(IoNumber.newWithDouble(IoCLI.state, 42));
            ccc.rawSetRunLocals(IoCLI.state.core);
            ccc.rawSetRunMessage(IoCLI.state.nilMessage);
            ccc.rawSetRunTarget(ccc);
            IoCLI.yieldingCoros.Add(ccc);

            //Console.WriteLine("Coro2 " + f.uniqueId + " creates Coro3 + " + ccc.uniqueId);

            IoCLI.yieldingCoros.Remove(f);
            //yield return null; // 2

            return(null);
        }
예제 #2
0
        private static IEnumerator Recurse3(IoCoroutine f)
        {
            IoCoroutine ccc = IoCoroutine.createObject(IoCLI.state);

            ccc.fiber                = new Fiber();
            ccc.fiber.currentCoro    = ccc;
            ccc.fiber.currentRoutine = IoCLI.Recurse4(ccc);
            ccc.rawSetResult(IoNumber.newWithDouble(IoCLI.state, 42));
            ccc.rawSetRunLocals(IoCLI.state.core);
            ccc.rawSetRunMessage(IoCLI.state.nilMessage);
            ccc.rawSetRunTarget(ccc);
            IoCLI.yieldingCoros.Add(ccc);

            Console.WriteLine("Recurse3+" + i++);

            yield return(ccc);
        }
예제 #3
0
        private static IEnumerator Recurse2(IoCoroutine f)
        {
            yield return(null); // just create and quit

            IoCoroutine ccc = IoCoroutine.createObject(IoCLI.state);

            ccc.fiber                = new Fiber();
            ccc.fiber.currentCoro    = ccc;
            ccc.fiber.currentRoutine = IoCLI.Recurse3(ccc);
            ccc.rawSetResult(IoNumber.newWithDouble(IoCLI.state, 42));
            ccc.rawSetRunLocals(IoCLI.state.core);
            ccc.rawSetRunMessage(IoCLI.state.nilMessage);
            ccc.rawSetRunTarget(ccc);
            IoCLI.yieldingCoros.Add(ccc);

            yield return(ccc);
        }
예제 #4
0
        private static IEnumerator Recurse3(IoCoroutine f)
        {
            int i = 0;

            IoCoroutine ccc = IoCoroutine.createObject(IoCLI.state);

            ccc.fiber             = new Fiber();
            ccc.fiber.currentCoro = ccc;
            //yield return
            ccc.fiber.currentRoutine = new FiberProc(IoCLI.Recurse4 /*(ccc)*/);
            if (coro.fiber.State == 4)
            {
                Console.WriteLine("Creation Error. Fiber Exceeds on Recurse 3 " + f.uniqueId);
                IoCLI.yieldingCoros.Remove(f);
                return(null);
            }
            ccc.rawSetResult(IoNumber.newWithDouble(IoCLI.state, 42));
            ccc.rawSetRunLocals(IoCLI.state.core);
            ccc.rawSetRunMessage(IoCLI.state.nilMessage);
            ccc.rawSetRunTarget(ccc);
            IoCLI.yieldingCoros.Add(ccc);

            IoCLI.yieldingCorosCount++;

            //Console.WriteLine("Coro3 " + f.uniqueId + " creates Coro4 + " + ccc.uniqueId);

            while (i < 2)
            {
                // f.fiber.Yield(f);
                //Console.WriteLine("Recurse3 Fiber: " + f.uniqueId + " Iteration: " + i++);
                //yield return null;
                i++;
            }

            IoCLI.yieldingCoros.Remove(f);

            return(null);
        }