private void Next(object source, ElapsedEventArgs e) { if (_index >= _data.Capacity) { _sink.Complete(); _timer.Stop(); _promise.TrySetResult(true); } else { _sink.Deliver(_data[_index++]); } }