Logo ProcessKit API Reference

StreamBufferPolicy Type

An opt-in bounded/backpressure policy for the streaming verbs (`StdoutLinesAsync` / `OutputEventsAsync` / `WaitForLineAsync`), set via `Command.StreamBuffer`. Unlike `OutputBufferPolicy` — which bounds an in-memory *buffer* a one-shot verb assembles — this bounds the *channel* between the background pump and your live consumer. Leaving it unset keeps today's unbounded channel: an unbounded, uncapped in-flight backlog, exactly as before this policy existed.

Instance members

Instance member Description

this.Capacity

Full Usage: this.Capacity

Returns: int

The bounded channel capacity, in lines/events not yet read by the consumer.

Returns: int

this.FullMode

Full Usage: this.FullMode

Returns: StreamFullMode

What happens once the channel reaches `Capacity`.

Returns: StreamFullMode

this.WithFullMode

Full Usage: this.WithFullMode

Parameters:
Returns: StreamBufferPolicy

A copy with the full-mode changed, composable with any policy.

fullMode : StreamFullMode
Returns: StreamBufferPolicy

Static members

Static member Description

StreamBufferPolicy.Bounded(capacity, fullMode)

Full Usage: StreamBufferPolicy.Bounded(capacity, fullMode)

Parameters:
Returns: StreamBufferPolicy

A channel bounded to `capacity` items with an explicit `fullMode`.

capacity : int
fullMode : StreamFullMode
Returns: StreamBufferPolicy

StreamBufferPolicy.Bounded(capacity)

Full Usage: StreamBufferPolicy.Bounded(capacity)

Parameters:
    capacity : int

Returns: StreamBufferPolicy

A channel bounded to `capacity` items that backpressures the producer once full — the safest default for an opt-in cap: lossless, at the cost of the child's observable timing.

capacity : int
Returns: StreamBufferPolicy

Type something to start searching.