Skip to content

ParallelStream API

fpstreams.ParallelStream

Bases: BaseStream[T]

__iter__()

Materializes the parallel results and returns an iterator. Allows: for item in Stream(data).parallel(): ...

batch(size)

Chunks the stream into lists of the given size inside the worker.

window(size, step=1)

Sliding window view. Note: In parallel, this only slides within the assigned chunk.

to_async()

Converts the parallel stream into an AsyncStream. Note: This materializes the parallel results first.