Closed kwonoj closed 8 years ago
This seems to be more related to take
, as when I remove take
it works fine.
cc/ @trxcllnt
Took a look this bit more, this is behavior of expand
. Internally it recursively calling _next()
to expand, having 2 problems
if (result._isScalar) {
this._next(result.value);
}
it infinitely continues while there isn't terminating condition.
for infinite expand with subscription, recursive call causes stack overflow
expand
is apparently missing the scheduler
argument. We should still default to "no scheduler", which means immediate execution (and potential stack overflow).
expand is apparently missing the scheduler argument
: compare to RxJS4, yes it does. I'll try changes for this.
(and potential stack overflow)
: I think this is similar case to https://github.com/ReactiveX/RxJS/issues/651, eventually might need some mechanism to avoid stack overflows.
eventually might need some mechanism to avoid stack overflows.
That mechanism is allowing users to provide a scheduler.
The problem is that any mechanism (scheduling) to avoid stack overflows also: 1. is less performant, and 2. makes debugging with call stacks gnarly. ... those are two of our top goals.
I'm closing this issue since scheduler
parameter is being tracked in #841 .
Took example snippet from RxJS 4,
RxJS4
RxJS Next