[][src]Crate par_stream

Asynchronous parallel streams analogous to rayon.

The ParStreamExt and TryParStreamExt traits extends existing Streams with parallel stream combinators.

The followings are common combinators.

The limit parameter configures the worker pool size. It accepts the following values.

  • None: The worker pool size scales to the number of system CPUs, and double size of input buffer.
  • 10 or non-zero integers: Scales the worker pool size to absolute 10, and double size of input buffer.
  • 2.3 or non-zero floating points: Scale the number of workers to 2.3 times the number of system CPUs, and double size of input buffer.
  • (10, 15): Scales to absolute 10 workers, and sets the input buffer size to 15.

Structs

ParForEach
ParGather
ParMap
ParMapUnordered
ParReduce
ParRouting
ParRoutingUnordered
ParStreamParams

Parallel stream parameters.

ReorderEnumerated
TryParForEach
TryParMap
TryParMapUnordered
TryReorderEnumerated
TryWrappingEnumerate
WrappingEnumerate

Enums

ParStreamConfig

Parallel stream configuration.

Traits

IntoParStreamConfig

A helper trait that converts types to parallel stream configuration.

ParFuture

An extension trait for Future that provides combinator functions for parallelism.

ParStreamExt

An extension trait for Stream that provides parallel combinator functions.

TryParStreamExt

An extension trait for TryStream that provides parallel combinator functions.

Functions

par_gather

Collect multiple streams into single stream.