예제 #1
0
 protected Actor(ActorId id, ActorsSystem system, IMailBox mailBox)
 {
     Id      = id;
     System  = system;
     MailBox = mailBox;
 }
예제 #2
0
        public RoundRobinActor(ActorId id, Func <Actor> workerFactory, int degreeOfParallelism, ActorsSystem system, IMailBox mailBox)
            : base(id, system, mailBox)
        {
            _workers = new Actor[degreeOfParallelism];

            for (int i = 0; i < degreeOfParallelism; i++)
            {
                _workers[i] = workerFactory();
            }
        }
예제 #3
0
 protected Actor(ActorId id, ActorsSystem system) : this(id, system, new DummyMailBox())
 {
 }
예제 #4
0
 public Scheduler(ActorsSystem system)
 {
     _system = system;
     _timer  = new Timer(_ => DispatchScheduledMessages(), null, dueTime: 0, period: 1);
 }