| FlowOperationsSelectAsyncT, TIn, TOut, TMat Method |
Transform this stream by applying the given function
asyncMapper to each of the elements
as they pass through this processing step. The function returns a
TaskTResult and the
value of that task will be emitted downstream. The number of tasks
that shall run in parallel is given as the first argument to
SelectAsyncT, TIn, TOut, TMat(FlowT, TIn, TMat, Int32, FuncTIn, TaskTOut).
These tasks may complete in any order, but the elements that
are emitted downstream are in the same order as received from upstream.
If the group by function
asyncMapper throws an exception or if the
Task is completed
with failure and the supervision decision is
Stop
the stream will be completed with failure.
If the group by function
asyncMapper throws an exception or if the
Task is completed
with failure and the supervision decision is
Resume or
Restart the element is dropped and the stream continues.
Emits when the task returned by the provided function finishes for the next element in sequence
Backpressures when the number of tasks reaches the configured parallelism and the downstream
backpressures or the first task is not completed
Completes when upstream completes and all tasks has been completed and all elements has been emitted
Cancels when downstream cancels
Namespace:
Akka.Streams.Dsl
Assembly:
Akka.Streams (in Akka.Streams.dll) Version: 1.2.3.129 (1.2.3.129)
Syntax public static Flow<T, TOut, TMat> SelectAsync<T, TIn, TOut, TMat>(
this Flow<T, TIn, TMat> flow,
int parallelism,
Func<TIn, Task<TOut>> asyncMapper
)
[<ExtensionAttribute>]
static member SelectAsync :
flow : Flow<'T, 'TIn, 'TMat> *
parallelism : int *
asyncMapper : Func<'TIn, Task<'TOut>> -> Flow<'T, 'TOut, 'TMat>
Parameters
- flow
- Type: Akka.Streams.DslFlowT, TIn, TMat
TBD - parallelism
- Type: SystemInt32
TBD - asyncMapper
- Type: SystemFuncTIn, TaskTOut
TBD
Type Parameters
- T
- TBD
- TIn
- TBD
- TOut
- TBD
- TMat
- TBD
Return Value
Type:
FlowT,
TOut,
TMatTBD
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
FlowT,
TIn,
TMat. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also