I have some code that processes events on a stream, and chooses to perform either an asynchronous operation, or simply return the value synchronously. A much simplified version of the code can be seen below. The output values must be in the same order as the input, hence the flatMapConcat.
and the stream never ends (i.e. onEnd is never called), whereas I would expect all values from 1 to 8 (and the stream to end).
If I change the synchronous operation to return Kefir.later(0, n), then all values are output and the stream ends, so I was thinking this must have something to do with the different between Stream and Property.
However, all values are emitted and the stream ends if I use flatMap instead of flatMapConcat, which is why I am posting this issue.
I have some code that processes events on a stream, and chooses to perform either an asynchronous operation, or simply return the value synchronously. A much simplified version of the code can be seen below. The output values must be in the same order as the input, hence the
flatMapConcat
.With the code above the results are:
and the stream never ends (i.e.
onEnd
is never called), whereas I would expect all values from1
to8
(and the stream to end).If I change the synchronous operation to return
Kefir.later(0, n)
, then all values are output and the stream ends, so I was thinking this must have something to do with the different betweenStream
andProperty
.However, all values are emitted and the stream ends if I use
flatMap
instead offlatMapConcat
, which is why I am posting this issue.