Crate par_stream[][src]

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.

Modules

prelude

Commonly used traits.

Structs

ParForEach
ParGather
ParMap
ParMapUnordered
ParReduce
ParRouting
ParRoutingUnordered
ParStreamConfig

Parallel stream configuration.

ParStreamParams

Parallel stream parameters.

ReorderEnumerated
TryParForEach
TryParMap
TryParMapUnordered
TryReorderEnumerated
TryWrappingEnumerate
WrappingEnumerate

Enums

Value

Sum type of absolute value and scaling value.

Traits

IntoParStreamParams
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.