of
emits a value after take(n)
should've already unsubscribed
#7366
-
Hello, I ran into the following behavior which seems like a bug. In this stream, I have a take(3) so I expected to see 3 logs from each concatMap. stackblitz link: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I think this is expected:
I hope this explains it 🙏 |
Beta Was this translation helpful? Give feedback.
I think this is expected:
of
emit all of the values synchronously.concatMap
keeps all of those emissions on a buffer, as it needs to run the map function for each one of them.concatMap
does the same: It will wait for a microtask to complete before moving to the next one.take(3)
will unsubscribe once the secondconcatMap
has emitted for the 3rd time.concatMap
had values on their buffer, so they will start mapping it before the secondconcatMap
emits the 3rd value.I hope this explains it 🙏