Exemple #1
0
        internal int AllocateDedicatedActor(IRuntime runtime, IActor actor)
        {
            lock (_lock)
            {
                int actorId = _nextActorId;
                _nextActorId++;
                string  name   = String.Format("Dedicated thread for actor {0}", actorId);
                IThread thread = new DedicatedThread(name, runtime, _logger, _errorHandler, actorId, actor);

                _actorsToThreads.Add(actorId, thread);
                thread.Start();
                return(actorId);
            }
        }
Exemple #2
0
        internal int AllocateDedicatedActor(IRuntime runtime, IActor actor)
        {
            lock (_lock)
            {
                int actorId = _nextActorId;
                _nextActorId++;
                string name = String.Format("Dedicated thread for actor {0}", actorId);
                IThread thread = new DedicatedThread(name, runtime, _logger, _errorHandler, actorId, actor);

                _actorsToThreads.Add(actorId, thread);
                thread.Start();
                return actorId;
            }
        }