Conversation
| const transformerQueue = this._transformerQueue, optional = this._optional; | ||
| let head, item; | ||
| while ((head = transformerQueue[0]) && head.transformer.done) { | ||
| while ((head = transformerQueue[0]) !== undefined) { |
There was a problem hiding this comment.
I feel the changes here could do with a little explanation:
In short - since end is now triggered by calling .read, we need to make sure that we now always have triggered at least one .read call before checking if the iterator is .done.
At the same time I added the ability to add data from multiple consecutive Transformers in the queue so long as they have data ready; this can reduce excessive calls to _read if the transformers in the queue only produce a small number of elements each.
|
@RubenVerborgh this is ready for review - apparently I don't have permissions to set you as a reviewer over here ... |
|
Copying some test code by @jeswr from #75 |
|
Note to self: whenever I revisit this PR, I should add some more tests, and review the code, to make sure that |
resolves #25
resolves #35
Part of #43 without any lint or limit changes