Click or drag to resize
Akka.NETFlowOperationsInterleaveTIn, T1, T2, TMat Method
Interleave is a deterministic merge of the given SourceTOut, TMat with elements of this FlowTIn, TOut, TMat. It first emits segmentSize number of elements from this flow to downstream, then - same amount for other source, then repeat process. After one of upstreams is complete than all the rest elements will be emitted from the second one If it gets error from one of upstreams - stream completes with failure.

Emits when element is available from the currently consumed upstream

Backpressures when downstream backpressures. Signal to current upstream, switch to next upstream when received segmentSize elements

Completes when the FlowTIn, TOut, TMat and given SourceTOut, TMat completes

Cancels when downstream cancels

Namespace:  Akka.Streams.Dsl
Assembly:  Akka.Streams (in Akka.Streams.dll) Version: 1.2.3.42 (1.2.3.42)
Syntax
public static Flow<TIn, T2, TMat> Interleave<TIn, T1, T2, TMat>(
	this Flow<TIn, T1, TMat> flow,
	IGraph<SourceShape<T2>, TMat> other,
	int segmentSize
)
where T1 : T2

Parameters

flow
Type: Akka.Streams.DslFlowTIn, T1, TMat
TBD
other
Type: Akka.StreamsIGraphSourceShapeT2, TMat
TBD
segmentSize
Type: SystemInt32
TBD

Type Parameters

TIn
TBD
T1
TBD
T2
TBD
TMat
TBD

Return Value

Type: FlowTIn, T2, TMat
TBD

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type FlowTIn, T1, 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).
Examples
Source(List(1, 2, 3)).Interleave(List(4, 5, 6, 7), 2) // 1, 2, 4, 5, 3, 6, 7
See Also