| SourceOperationsInterleaveT1, T2, TMat 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 Source<T2, TMat> Interleave<T1, T2, TMat>(
this Source<T1, TMat> flow,
IGraph<SourceShape<T2>, TMat> other,
int segmentSize
)
where T1 : T2
[<ExtensionAttribute>]
static member Interleave :
flow : Source<'T1, 'TMat> *
other : IGraph<SourceShape<'T2>, 'TMat> *
segmentSize : int -> Source<'T2, 'TMat> when 'T1 : 'T2
Parameters
- flow
- Type: Akka.Streams.DslSourceT1, TMat
TBD - other
- Type: Akka.StreamsIGraphSourceShapeT2, TMat
TBD - segmentSize
- Type: SystemInt32
TBD
Type Parameters
- T1
- TBD
- T2
- TBD
- TMat
- TBD
Return Value
Type:
SourceT2,
TMatTBD
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
SourceT1,
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)
See Also