Click or drag to resize
Akka.NETSubFlowOperationsInterleaveT1, T2, TMat, TClosed Method
Interleave is a deterministic merge of the given SourceTOut, TMat with elements of this IFlowTOut, 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 IFlowTOut, 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 SubFlow<T2, TMat, TClosed> Interleave<T1, T2, TMat, TClosed>(
	this SubFlow<T1, TMat, TClosed> flow,
	IGraph<SourceShape<T2>, TMat> other,
	int segmentSize
)
where T1 : T2

Parameters

flow
Type: Akka.Streams.DslSubFlowT1, TMat, TClosed
TBD
other
Type: Akka.StreamsIGraphSourceShapeT2, TMat
TBD
segmentSize
Type: SystemInt32
TBD

Type Parameters

T1
TBD
T2
TBD
TMat
TBD
TClosed
TBD

Return Value

Type: SubFlowT2, TMat, TClosed
TBD

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type SubFlowT1, TMat, TClosed. 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