-
Notifications
You must be signed in to change notification settings - Fork 0
Description
iterable/src/core/transient-source.ts
Line 215 in 6fceaa0
| const id = (this.idGenerator += 1); |
Right now we are forcing users to complete their iterations, but this may not always be the case, this would lead to ever growing stacks of values for something that is never going to be utilized.
This would mean that an iterator would have to maintain its own view of the data as well
To achieve this we need to split being able to directly push to an iterable, this will allow for an internal source that all iterators "listen in on", it would be a sync iterator because it is a sync process of setting a value.
This would remove the need to loop over every id and modify the array of values each time there is an iteration
It would also greatly improve and simplify the overall implementation