Example #1
0
            protected override void StartGraph()
            {
                var sourceOut = CreateSubOutlet(_stage.In);
                var sinkIn    = CreateSubInlet(_stage.Out);

                Source.FromGraph(sourceOut.Source).Via(_stage.FlowFactory()).RunWith(sinkIn.Sink, SubFusingMaterializer);
                if (IsAvailable(_stage.Out))
                {
                    sinkIn.Pull();
                }
                activeOutIn = Tuple.Create(sourceOut, sinkIn);
            }
Example #2
0
            protected override void StartGraph()
            {
                var sourceOut = CreateSubOutlet(_stage.In);
                var sinkIn    = CreateSubInlet(_stage.Out);

                var graph = Source.FromGraph(sourceOut.Source)
                            //temp fix becaues the proper fix would be to have a concept of cause of cancellation. See https://github.com/akka/akka/pull/23909
                            //TODO register issue to track this
                            .Via(DelayCancellation <TIn>(_delay))
                            .Via(_stage.FlowFactory())
                            .To(sinkIn.Sink);

                SubFusingMaterializer.Materialize(graph, _inheritedAttributes);

                if (IsAvailable(_stage.Out))
                {
                    sinkIn.Pull();
                }

                _activeOutIn = Tuple.Create(sourceOut, sinkIn);
            }