AsyncIterator
AsyncIterator copied to clipboard
An asynchronous iterator library for advanced object pipelines in JavaScript
Note to self for now: See if we can remove macroTasking behavior - in particular see if we are able to do something like the following after fixing autoStart behavior...
In particular this logic https://github.com/LDflex/LDflex-Comunica/blob/f01ece6fa8cee720061efd5ddd23ed82921555e4/src/ComunicaEngine.ts#L158-L215 should be implemented as the `[Symbol.asyncIterator]` method of `AsyncIterator`
While we are doing a semver upgrade we may also want to migrate to use https://www.npmjs.com/package/eventemitter3 which appears to be a much less bloated; and more optimised version over the...
The UnionIterator is used in [the bind join in comunica](https://github.com/comunica/comunica/blob/c3dd70a424e175877fd883277e9d0191bc15bf62/packages/actor-rdf-join-inner-multi-bind/lib/ActorRdfJoinMultiBind.ts#L78) (and [incremunica](https://github.com/maartyman/incremunica/blob/28f4c24ca9122f27de6197239e4deb07e786a2b7/packages/actor-rdf-join-inner-incremental-computational-multi-bind/lib/ActorRdfJoinInnerIncrementalComputationalMultiBind.ts#L164)). During some performance tests, I saw that the UnionIterator called `read()` on all its sub-iterators, even if only...
This PR changes the task scheduler to use an externally-provided macrotask scheduling function and defaults to using the `setImmediate()` implementation from [`tiny-set-immediate`](https://github.com/jquense/tiny-set-immediate). This is done to work around performance issues...
Hi everyone, I wonder if it would fit the library's design to give functions like [`fromArray`](https://github.com/RubenVerborgh/AsyncIterator/blob/0f8909b1c736e6a7aed4d1213a5d9260b8ea22af/asynciterator.ts#L2248) the option to set the autoStart to a user-defined value. If this is the...
## Cloning a ClonedIterator doesn't preserve HistoryReader from original source ### Description When cloning an `AsyncIterator` that is itself already a clone, the new clone doesn't share the same [`HistoryReader`](https://github.com/RubenVerborgh/AsyncIterator/blob/0933ec72ea252b7026c3f659dc3832e94d4bd377/asynciterator.ts#L2012)...