I have several observables request. Each observable request is recursive call and when there is no more data, it will call EMPTY.
for example:
request1 = recursive observable call
request2 = recursive observable call
request3 = recursive observable call
Then i use forJoin
forJoin(request, request2, request3).subscribe();
The forkJoin will callback with complete when anyone of them finish. It actually not wait for all observables complete. I check the rxjs document, it mention
When all observables complete, emit the last emitted value from each.
As I don't care these observables return value, so it would not emit value to the forkJoin observer. Then i found that in this case if only one complete, forkJoin observer is notified with complete.
Is this the observable limitation that i do need to emit value to able to wait for all observables complete?
Thanks a lot.
forkJoin
won't complete unless all source Observable emit at least one value. If one source just completes and doesn't emit anythingforkJoin
will never complete. - martin