55using System . Threading . Tasks . Dataflow ;
66
77
8- namespace Open . Dataflow
8+ namespace Open . Threading . Dataflow
99{
1010 public static partial class DataFlowExtensions
1111 {
@@ -74,6 +74,7 @@ public static ActionBlock<T> Pipe<T>(this ISourceBlock<T> source,
7474 var receiver = options == null
7575 ? new ActionBlock < T > ( handler )
7676 : new ActionBlock < T > ( handler , options ) ;
77+
7778 source . LinkToWithCompletion ( receiver ) ;
7879 return receiver ;
7980 }
@@ -113,7 +114,7 @@ public static ActionBlock<T> PipeAsync<T>(this ISourceBlock<T> source,
113114 /// <param name="handler">The handler function to apply.</param>
114115 /// <param name="cancellationToken">An optional cancellation token.</param>
115116 /// <returns>The ActionBlock created.</returns>
116- public static ActionBlock < T > Parallel < T > ( this ISourceBlock < T > source ,
117+ public static ActionBlock < T > PipeConcurrently < T > ( this ISourceBlock < T > source ,
117118 int maxConcurrency ,
118119 Action < T > handler ,
119120 CancellationToken cancellationToken = default )
@@ -133,7 +134,7 @@ public static ActionBlock<T> Parallel<T>(this ISourceBlock<T> source,
133134 /// <param name="handler">The async handler function to apply.</param>
134135 /// <param name="cancellationToken">An optional cancellation token.</param>
135136 /// <returns>The ActionBlock created.</returns>
136- public static ActionBlock < T > ParallelAsync < T > ( this ISourceBlock < T > source ,
137+ public static ActionBlock < T > PipeConcurrentlyAsync < T > ( this ISourceBlock < T > source ,
137138 int maxConcurrency ,
138139 Func < T , Task > handler ,
139140 CancellationToken cancellationToken = default )
@@ -154,7 +155,7 @@ public static ActionBlock<T> ParallelAsync<T>(this ISourceBlock<T> source,
154155 /// <param name="transform">The transform function to apply.</param>
155156 /// <param name="cancellationToken">An optional cancellation token.</param>
156157 /// <returns>The TransformBlock created.</returns>
157- public static IReceivableSourceBlock < TOut > Parallel < TIn , TOut > ( this ISourceBlock < TIn > source ,
158+ public static IReceivableSourceBlock < TOut > PipeConcurrently < TIn , TOut > ( this ISourceBlock < TIn > source ,
158159 int maxConcurrency ,
159160 Func < TIn , TOut > transform ,
160161 CancellationToken cancellationToken = default )
@@ -175,7 +176,7 @@ public static IReceivableSourceBlock<TOut> Parallel<TIn, TOut>(this ISourceBlock
175176 /// <param name="transform">The async transform function to apply.</param>
176177 /// <param name="cancellationToken">An optional cancellation token.</param>
177178 /// <returns>The TransformBlock created.</returns>
178- public static IReceivableSourceBlock < TOut > ParallelAsync < TIn , TOut > ( this ISourceBlock < TIn > source ,
179+ public static IReceivableSourceBlock < TOut > PipeConcurrentlyAsync < TIn , TOut > ( this ISourceBlock < TIn > source ,
179180 int maxConcurrency ,
180181 Func < TIn , Task < TOut > > transform ,
181182 CancellationToken cancellationToken = default )
@@ -196,7 +197,7 @@ public static IReceivableSourceBlock<TOut> ParallelAsync<TIn, TOut>(this ISource
196197 /// <param name="handler">The handler function to apply.</param>
197198 /// <param name="cancellationToken">An optional cancellation token.</param>
198199 /// <returns>The ActionBlock created.</returns>
199- public static ActionBlock < T > BoundedParallel < T > ( this ISourceBlock < T > source ,
200+ public static ActionBlock < T > Pipe < T > ( this ISourceBlock < T > source ,
200201 int capacity ,
201202 int maxConcurrency ,
202203 Action < T > handler ,
@@ -219,7 +220,7 @@ public static ActionBlock<T> BoundedParallel<T>(this ISourceBlock<T> source,
219220 /// <param name="handler">The async handler function to apply.</param>
220221 /// <param name="cancellationToken">An optional cancellation token.</param>
221222 /// <returns>The ActionBlock created.</returns>
222- public static ActionBlock < T > BoundedParallelAsync < T > ( this ISourceBlock < T > source ,
223+ public static ActionBlock < T > PipeAsync < T > ( this ISourceBlock < T > source ,
223224 int capacity ,
224225 int maxConcurrency ,
225226 Func < T , Task > handler ,
@@ -243,7 +244,7 @@ public static ActionBlock<T> BoundedParallelAsync<T>(this ISourceBlock<T> source
243244 /// <param name="transform">The transform function to apply.</param>
244245 /// <param name="cancellationToken">An optional cancellation token.</param>
245246 /// <returns>The TransformBlock created.</returns>
246- public static IReceivableSourceBlock < TOut > BoundedParallel < TIn , TOut > ( this ISourceBlock < TIn > source ,
247+ public static IReceivableSourceBlock < TOut > Pipe < TIn , TOut > ( this ISourceBlock < TIn > source ,
247248 int capacity ,
248249 int maxConcurrency ,
249250 Func < TIn , TOut > transform ,
@@ -268,7 +269,7 @@ public static IReceivableSourceBlock<TOut> BoundedParallel<TIn, TOut>(this ISour
268269 /// <param name="transform">The async transform function to apply.</param>
269270 /// <param name="cancellationToken">An optional cancellation token.</param>
270271 /// <returns>The TransformBlock created.</returns>
271- public static IReceivableSourceBlock < TOut > BoundedParallelAsync < TIn , TOut > ( this ISourceBlock < TIn > source ,
272+ public static IReceivableSourceBlock < TOut > PipeAsync < TIn , TOut > ( this ISourceBlock < TIn > source ,
272273 int capacity ,
273274 int maxConcurrency ,
274275 Func < TIn , Task < TOut > > transform ,
@@ -290,7 +291,7 @@ public static IReceivableSourceBlock<TOut> BoundedParallelAsync<TIn, TOut>(this
290291 /// <param name="handler">The handler function to apply.</param>
291292 /// <param name="cancellationToken">An optional cancellation token.</param>
292293 /// <returns>The ActionBlock created.</returns>
293- public static ActionBlock < T > Bounded < T > ( this ISourceBlock < T > source ,
294+ public static ActionBlock < T > PipeLimited < T > ( this ISourceBlock < T > source ,
294295 int capacity ,
295296 Action < T > handler ,
296297 CancellationToken cancellationToken = default )
@@ -310,7 +311,7 @@ public static ActionBlock<T> Bounded<T>(this ISourceBlock<T> source,
310311 /// <param name="handler">The async handler function to apply.</param>
311312 /// <param name="cancellationToken">An optional cancellation token.</param>
312313 /// <returns>The ActionBlock created.</returns>
313- public static ActionBlock < T > Bounded < T > ( this ISourceBlock < T > source ,
314+ public static ActionBlock < T > PipeLimitedAsync < T > ( this ISourceBlock < T > source ,
314315 int capacity ,
315316 Func < T , Task > handler ,
316317 CancellationToken cancellationToken = default )
@@ -331,7 +332,7 @@ public static ActionBlock<T> Bounded<T>(this ISourceBlock<T> source,
331332 /// <param name="transform">The transform function to apply.</param>
332333 /// <param name="cancellationToken">An optional cancellation token.</param>
333334 /// <returns>The TransformBlock created.</returns>
334- public static IReceivableSourceBlock < TOut > Bounded < TIn , TOut > ( this ISourceBlock < TIn > source ,
335+ public static IReceivableSourceBlock < TOut > PipeLimited < TIn , TOut > ( this ISourceBlock < TIn > source ,
335336 int capacity ,
336337 Func < TIn , TOut > transform ,
337338 CancellationToken cancellationToken = default )
@@ -352,7 +353,7 @@ public static IReceivableSourceBlock<TOut> Bounded<TIn, TOut>(this ISourceBlock<
352353 /// <param name="transform">The async transform function to apply.</param>
353354 /// <param name="cancellationToken">An optional cancellation token.</param>
354355 /// <returns>The TransformBlock created.</returns>
355- public static IReceivableSourceBlock < TOut > Bounded < TIn , TOut > ( this ISourceBlock < TIn > source ,
356+ public static IReceivableSourceBlock < TOut > PipeLimitedAsync < TIn , TOut > ( this ISourceBlock < TIn > source ,
356357 int capacity ,
357358 Func < TIn , Task < TOut > > transform ,
358359 CancellationToken cancellationToken = default )
0 commit comments