var cts = new CancellationTokenSource();
Task.Factory.StartNew(() =>
{
Thread.Sleep(100);
cts.Cancel();
});
Pipeline<bool, bool> pipeline = Pipeline.Create(new Func<bool, bool>(i => i));
var l = new List<bool>();
Task.Factory.StartNew(() => pipeline.Process(Infinite(), cts.Token))
.ContinueWith(t => { }, TaskContinuationOptions.OnlyOnFaulted).Wait();