Skip to content

Exact Sized Recursive Iterator

Choose a tag to compare

@orxfun orxfun released this 20 Oct 20:21
· 137 commits to main since this release
d9cb745

Two variants are introduced:

  • [ConcurrentRecursiveIter]. This is equivalent to the prior implementation with unknown size. Size refers to the total number of elements that will be returned by the iterator, which is the total of initial elements and all elements created by the recursive extend calls.
  • [ConcurrentRecursiveIterExact]: This is the recursive concurrent iterator where the size is known ahead of time before recursively extending for each element. This is critical in achieving performant parallelization when the recursive concurrent iterator is used as an input of a parallel iteration.

Accordingly, From queue implementations are updated. In particular additional implementations are provided to allow for creating exact sized iterators from concurrent queues using any kind of pinned vector for storage.

Upgrades PinnedVec for improved safety guarantees: https://github.com/orxfun/orx-pinned-vec/releases/tag/3.21.0

Upgrades ConcurrentIter for fused iterator behavior of the concurrent iter implementation: https://github.com/orxfun/orx-concurrent-iter/releases/tag/3.3.0. With this update is_completed_when_none_returned implementation is provided to allow callers make sure that the iterator is completely consumed.