Example #1
0
        public GraphInterpreterShell(GraphAssembly assembly, IInHandler[] inHandlers, IOutHandler[] outHandlers, GraphStageLogic[] logics, Shape shape, ActorMaterializerSettings settings, ActorMaterializerImpl materializer)
        {
            _assembly    = assembly;
            _inHandlers  = inHandlers;
            _outHandlers = outHandlers;
            _logics      = logics;
            _shape       = shape;
            _settings    = settings;
            Materializer = materializer;

            _inputs             = new ActorGraphInterpreter.BatchingActorInputBoundary[shape.Inlets.Count()];
            _outputs            = new ActorGraphInterpreter.IActorOutputBoundary[shape.Outlets.Count()];
            _subscribersPending = _inputs.Length;
            _publishersPending  = _outputs.Length;
            _shellEventLimit    = settings.MaxInputBufferSize * (assembly.Inlets.Length + assembly.Outlets.Length);
            _abortLimit         = _shellEventLimit * 2;

            _resume = new ActorGraphInterpreter.Resume(this);
        }