Interleave the messages produced asynchronously on a channel with the messages produced on an other channel.
Interleave the messages produced asynchronously on a channel with the messages
produced on an other channel.
This builds a new input channel that produces one message of type Either[A, B] for every
message produce on one or the other channel, where A
is the type of messages produced
on the left
channel and B
is the type of messages
produced on the right
channel. By default, the resulting channel is closed when both
input channels are closed.
the left input channel
the right input channel
flag that indicating if the resulting channel must be closed if this channel is closed.
flag that indicating if the resulting channel must be closed if the other channel is closed.
a new input channel that produces one message of type Either[A, B] for every message produce on this or the other channel
This one is useful for checking timeout and ensure that a timeout channel is only created if there is no data on the left channel.
This one is useful for checking timeout and ensure that a timeout channel is only created if there is no data on the left channel. The boolean flag is true is the second channel has not been evaluated.
Note that f
will be called immediately if the next segment is empty and/or the next channel is Nil.