Beispiel #1
0
        private ActorRunner(ActorNodeConfig conf)
        {
            Conf = conf;

            State = ActorRunState.Running;

            ActorThread = Task.Run(async () =>
            {
                Actor = ActorFactory.Create(conf);
                while (Actor.IsActive)
                {
                    await Task.Delay(1000);
                    SecondsTick++;
                }
            });

            //while (State == ActorRunState.None)
            //{
            //    // block
            //}

            Runners[conf.Name] = this;
        }
Beispiel #2
0
        private ActorRunner(ActorNodeConfig conf)
        {
            Conf = conf;


            State = ActorRunState.Running;

            ActorThread = Task.Run(async() =>
            {
                Actor = ActorFactory.Create(conf);
                while (Actor.IsActive)
                {
                    await Task.Delay(1000);
                    SecondsTick++;
                }
            });

            //while (State == ActorRunState.None)
            //{
            //    // block
            //}

            Runners[conf.Name] = this;
        }