public async Task Do() { var messages = new ConcurrentQueue<TransportMessage>(); messages.Enqueue(new TransportMessage()); messages.Enqueue(new TransportMessage()); messages.Enqueue(new TransportMessage()); var countdown = new AsyncCountdownEvent(3); var pipelineFactory = new IncomingPipelineFactory(); pipelineFactory.Register(() => new DelayStep()); pipelineFactory.Register(() => new LogStep()); pipelineFactory.Register(() => new DecrementStep(countdown)); var strategy = new DequeueStrategy(messages, maxConcurrency: 1); await strategy.StartAsync(tm => Connector(pipelineFactory, tm)); await countdown.WaitAsync(); await strategy.StopAsync(); }
public DebugView(AsyncCountdownEvent ce) { _ce = ce; }
public DecrementStep(AsyncCountdownEvent countdown) { this.countdown = countdown; }