You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is three ending listeners attached, one of the them (in the middle) takes 0 (or 1 item), and this causes kind of a leak after all all listeners detached
.
The text was updated successfully, but these errors were encountered:
Not pointing on urgency but commenting the weight (could) - this issue needs to be checked and fixed because it may mean that there is something wrong with whole approach to inner cycles detection.
Here, if a value is already present (which is the case if there are already any listeners attached), it is emitted before the listener is really added. In case of take(1) it leads to instant completion of outer stream. TakeOperator therefore stops and tries to remove itself from the source$ MemoryStream internal listeners list. But it isn't present at that list yet, so it's a no-op. Then, in the second line of MemoryStream#_add, it finally adds itself and stays there forever.
A simple solution would be if MemoryStream just added listeners before emitting the current value, but I'm not sure it wouldn't lead to other bugs, so maybe a better option would be if operators removed itself asynchronously.
staltz
changed the title
Leaky case of new imitate
Leaky execution related to a race condition when a listener is added to a MemoryStream
Oct 24, 2016
http://www.webpackbin.com/Ny3m5bc4-
See console output.
There is three ending listeners attached, one of the them (in the middle) takes 0 (or 1 item), and this causes kind of a leak after all all listeners detached
.
The text was updated successfully, but these errors were encountered: