-
Hello, Not clear if this is an issue, or I don't understand the rxjs contract. My use case is kicking off multiple observables in parallel say for a download, where some operations cannot continue processing until other operations have completed. I expected the buffer operator below to emit 2 after
Base never emitted, so this was unexpected. const base = timer(1000);
const dep = of(2).pipe(
buffer(base),
mergeAll(),
tap(x => console.log(x)
);
forkJoin([
base, dep, // third, forth..
]).subscribe(() => {
//Done
}) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @nous- ! I understand why you think that this behavior is unexpected. However, this is the behavior that I was expecting and I was happy to see that there is a test that takes this case into account. Although, I think that the sentence of the docs should be improved, because it's not accurate to say that the resulting observable emits only when the notifier does... it could also emit if the source completes, even if the notifier has not emitted yet. |
Beta Was this translation helpful? Give feedback.
Hi @nous- !
I understand why you think that this behavior is unexpected.
However, this is the behavior that I was expecting and I was happy to see that there is a test that takes this case into account.
Although, I think that the sentence of the docs should be improved, because it's not accurate to say that the resulting observable emits only when the notifier does... it could also emit if the source completes, even if the notifier has not emitted yet.