Stream

zio.blocks.streams.Stream
See theStream companion object
abstract class Stream[+E, +A] extends StreamPlatformSpecific[E, A]

A lazy, pull-based, resource-safe sequence of elements of type A that may fail with an error of type E.

A Stream is a ''description'': nothing executes until a terminal operation is driven. Cross-platform terminals such as runAsync, runCollectAsync, and headAsync return Async[Either[E, Z]]. The JVM additionally provides blocking terminals such as run, runCollect, and head, which return Either[E, Z]. Left contains typed stream errors; defects fail the outer Async or propagate from a JVM blocking terminal.

Type parameters

A

Element type.

E

Error type.

Attributes

Companion
object
Source
Stream.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def render: String

Renders this stream as a human-readable description of its pipeline.

Renders this stream as a human-readable description of its pipeline.

Attributes

Source
Stream.scala

Concrete methods

def &&[E2, E3, B, C](that: Stream[E2, B])(implicit errorConcat: WithOut[E, E2, E3], zip: Zip[A, B, C], jtC: Infer[C]): Stream[E3, C]

Zips this stream with that, pairing elements positionally. Shorter stream determines length. Uses zio.blocks.combinators.Tuples for flattened composition: a && b && c produces a Stream of (A, B, C).

Zips this stream with that, pairing elements positionally. Shorter stream determines length. Uses zio.blocks.combinators.Tuples for flattened composition: a && b && c produces a Stream of (A, B, C).

Attributes

Source
Stream.scala
final def ++[E2, E3, A2, A3](that: Stream[E2, A2])(implicit errorConcat: WithOut[E, E2, E3], valueConcat: WithOut[A, A2, A3], jtA3: Infer[A3]): Stream[E3, A3]

Alias for concat.

Alias for concat.

Attributes

Source
Stream.scala
def buffer(n: Int): Stream[E, A]

Decouples upstream production from downstream consumption with a bounded buffer of n elements while preserving order. n must be at least one. Failure, downstream close, or cancellation closes the producer.

Decouples upstream production from downstream consumption with a bounded buffer of n elements while preserving order. n must be at least one. Failure, downstream close, or cancellation closes the producer.

Attributes

Source
Stream.scala
def catchAll[E2, A2, A3](f: E => Stream[E2, A2])(implicit valueConcat: WithOut[A, A2, A3], jtA3: Infer[A3]): Stream[E2, A3]

On the first typed error, closes the failing stream and lazily switches to the stream returned by f. Defects are not handled.

On the first typed error, closes the failing stream and lazily switches to the stream returned by f. Defects are not handled.

Attributes

Source
Stream.scala
def catchDefect[E2, E3, A2, A3](f: PartialFunction[Throwable, Stream[E2, A2]])(implicit errorConcat: WithOut[E, E2, E3], valueConcat: WithOut[A, A2, A3], jtA3: Infer[A3]): Stream[E3, A3]

On the first non-fatal defect matched by f, closes the failing stream and lazily switches to the selected stream. Typed errors and unmatched defects are not handled.

On the first non-fatal defect matched by f, closes the failing stream and lazily switches to the selected stream. Typed errors and unmatched defects are not handled.

Attributes

Source
Stream.scala
def chunked(n: Int): Stream[E, Chunk[A]]

Groups elements into Chunks of size n, preserving order. The final group may be smaller; n must be at least one.

Groups elements into Chunks of size n, preserving order. The final group may be smaller; n must be at least one.

Attributes

Source
Stream.scala
def collect[B](pf: PartialFunction[A, B])(implicit jtB: Infer[B]): Stream[E, B]

Applies a partial function, emitting only defined results.

Applies a partial function, emitting only defined results.

Attributes

Source
Stream.scala
def collectAsync[B](f: A => encoding.Async[Option[B]])(implicit jtB: Infer[B]): Stream[E, B]

Asynchronously transforms defined elements, dropping None results.

Asynchronously transforms defined elements, dropping None results.

Attributes

Source
Stream.scala
def concat[E2, E3, A2, A3](that: Stream[E2, A2])(implicit errorConcat: WithOut[E, E2, E3], valueConcat: WithOut[A, A2, A3], jtA3: Infer[A3]): Stream[E3, A3]

Emits all elements of this followed by all elements of that.

Emits all elements of this followed by all elements of that.

Attributes

Source
Stream.scala
def countAsync: encoding.Async[Either[E, Long]]

Asynchronously counts the number of elements.

Asynchronously counts the number of elements.

Attributes

Source
Stream.scala
def distinct: Stream[E, A]

Emits the first occurrence of each element, preserving order. Distinctness state is allocated per materialization and may grow without bound.

Emits the first occurrence of each element, preserving order. Distinctness state is allocated per materialization and may grow without bound.

Attributes

Source
Stream.scala
def distinctBy[K](f: A => K): Stream[E, A]

Emits the first element for each key computed by f, preserving order. Key state is allocated per materialization and may grow without bound.

Emits the first element for each key computed by f, preserving order. Key state is allocated per materialization and may grow without bound.

Attributes

Source
Stream.scala
def distinctByAsync[K](f: A => encoding.Async[K]): Stream[E, A]

Sequentially computes keys and emits the first element for each key, preserving order. Key state is per materialization and may grow without bound; asynchronous failures are defects.

Sequentially computes keys and emits the first element for each key, preserving order. Key state is per materialization and may grow without bound; asynchronous failures are defects.

Attributes

Source
Stream.scala
def drop(n: Long): Stream[E, A]

Skips the first n elements, then emits the rest. n <= 0 is a no-op.

Skips the first n elements, then emits the rest. n <= 0 is a no-op.

Attributes

Source
Stream.scala
def ensuring(finalizer: => Unit): Stream[E, A]

Registers finalizer lazily and runs it exactly once when the materialized stream closes, including normal completion, failure, early termination, and cancellation. A finalizer exception is a defect.

Registers finalizer lazily and runs it exactly once when the materialized stream closes, including normal completion, failure, early termination, and cancellation. A finalizer exception is a defect.

Attributes

Source
Stream.scala
def ensuringAsync(finalizer: => encoding.Async[Unit]): Stream[E, A]

Registers an asynchronous finalizer lazily and awaits it exactly once when the materialized stream closes, including normal completion, failure, early termination, and cancellation. Finalizer failure is a defect.

Registers an asynchronous finalizer lazily and awaits it exactly once when the materialized stream closes, including normal completion, failure, early termination, and cancellation. Finalizer failure is a defect.

Attributes

Source
Stream.scala
def existsAsync(pred: A => encoding.Async[Boolean]): encoding.Async[Either[E, Boolean]]

Asynchronously tests whether any element satisfies pred.

Asynchronously tests whether any element satisfies pred.

Attributes

Source
Stream.scala
def filter(pred: A => Boolean): Stream[E, A]

Emits only elements satisfying pred.

Emits only elements satisfying pred.

Attributes

Source
Stream.scala
def filterAsync(pred: A => encoding.Async[Boolean]): Stream[E, A]

Tests elements sequentially and emits those satisfying the asynchronous predicate, preserving order. Predicate failure is a defect.

Tests elements sequentially and emits those satisfying the asynchronous predicate, preserving order. Predicate failure is a defect.

Attributes

Source
Stream.scala
def findAsync(pred: A => encoding.Async[Boolean]): encoding.Async[Either[E, Option[A]]]

Asynchronously returns the first element satisfying pred, or None.

Asynchronously returns the first element satisfying pred, or None.

Attributes

Source
Stream.scala
def flatMap[E2, E3, B](f: A => Stream[E2, B])(implicit errorConcat: WithOut[E, E2, E3], jtB: Infer[B]): Stream[E3, B]

Maps each element to an inner stream and consumes those streams sequentially in input order, closing each before advancing to the next.

Maps each element to an inner stream and consumes those streams sequentially in input order, closing each before advancing to the next.

Attributes

Source
Stream.scala
def flatMapPar[E1 >: E, B](n: Int)(f: A => Stream[E1, B])(implicit jtB: Infer[B]): Stream[E1, B]

Applies f to each element to produce an inner stream, then merges up to n inner streams concurrently. Output is unordered (arrival order, not input order). On JVM, each inner stream runs on a virtual thread. On JS, degrades to sequential flatMap. n must be at least one. Failure or cancellation closes the outer stream and all active inner streams.

Applies f to each element to produce an inner stream, then merges up to n inner streams concurrently. Output is unordered (arrival order, not input order). On JVM, each inner stream runs on a virtual thread. On JS, degrades to sequential flatMap. n must be at least one. Failure or cancellation closes the outer stream and all active inner streams.

Attributes

Source
Stream.scala
def forallAsync(pred: A => encoding.Async[Boolean]): encoding.Async[Either[E, Boolean]]

Asynchronously tests whether all elements satisfy pred.

Asynchronously tests whether all elements satisfy pred.

Attributes

Source
Stream.scala
def foreachAsync(f: A => encoding.Async[Unit]): encoding.Async[Either[E, Unit]]

Alias for runForeachAsync.

Alias for runForeachAsync.

Attributes

Source
Stream.scala
def grouped(n: Int): Stream[E, Chunk[A]]

Alias for chunked. Matches upstream naming.

Alias for chunked. Matches upstream naming.

Attributes

Source
Stream.scala
def headAsync: encoding.Async[Either[E, Option[A]]]

Asynchronously returns the first element, or None if empty.

Asynchronously returns the first element, or None if empty.

Attributes

Source
Stream.scala
def intersperse[A2, A3](sep: A2)(implicit valueConcat: WithOut[A, A2, A3], jtA3: Infer[A3]): Stream[E, A3]

Inserts sep between each pair of consecutive elements.

Inserts sep between each pair of consecutive elements.

Attributes

Source
Stream.scala
def knownChunk: Option[Chunk[A]]

Returns the underlying Chunk if this stream wraps a known, materialized chunk, None otherwise. O(1).

Returns the underlying Chunk if this stream wraps a known, materialized chunk, None otherwise. O(1).

Only streams created via Stream.fromChunk, Stream.fromArray, or Stream.empty return Some. All combinators (map, filter, take, drop, concat, etc.) return None because the chunk identity is lost after transformation.

Attributes

Source
Stream.scala
def knownLength: Option[Long]

Returns the number of elements if known without consuming the stream, None otherwise. O(1).

Returns the number of elements if known without consuming the stream, None otherwise. O(1).

Element-preserving combinators like map propagate the count. Element-filtering combinators like filter invalidate it.

Attributes

Source
Stream.scala
def lastAsync: encoding.Async[Either[E, Option[A]]]

Asynchronously returns the last element, or None if empty.

Asynchronously returns the last element, or None if empty.

Attributes

Source
Stream.scala
def map(f: A => Nothing)(implicit dummy: DummyImplicit): Stream[E, Nothing]

Lazily transforms each element with f, preserving order.

Lazily transforms each element with f, preserving order.

Attributes

Source
Stream.scala
def map[B](f: A => B)(implicit jtB: Infer[B]): Stream[E, B]

Lazily transforms each element with f, preserving order.

Lazily transforms each element with f, preserving order.

Attributes

Source
Stream.scala
def mapAccum[S, B](init: S)(f: (S, A) => (S, B))(implicit jtB: Infer[B]): Stream[E, B]

Transforms elements with a stateful function f, threading state S through each step and emitting the B from each result.

Transforms elements with a stateful function f, threading state S through each step and emitting the B from each result.

Value parameters

f

Function that takes the current state and an element, returning the updated state and the output element.

init

Initial state value.

Attributes

Source
Stream.scala
def mapAccumAsync[S, B](init: S)(f: (S, A) => encoding.Async[(S, B)])(implicit jtB: Infer[B]): Stream[E, B]

Asynchronously transforms elements while threading state sequentially. At most one invocation of f is active at a time.

Asynchronously transforms elements while threading state sequentially. At most one invocation of f is active at a time.

Attributes

Source
Stream.scala
def mapAsync[B](f: A => encoding.Async[B])(implicit jtB: Infer[B]): Stream[E, B]

Asynchronously transforms each element.

Asynchronously transforms each element.

Attributes

Source
Stream.scala
def mapError[E2](f: E => E2): Stream[E2, A]

Transforms the error channel with f, leaving elements unchanged.

Transforms the error channel with f, leaving elements unchanged.

Attributes

Source
Stream.scala
def mapErrorAsync[E2](f: E => encoding.Async[E2]): Stream[E2, A]

Asynchronously transforms the typed error channel. It runs only when the source fails with a typed error; callback failure is a defect.

Asynchronously transforms the typed error channel. It runs only when the source fails with a typed error; callback failure is a defect.

Attributes

Source
Stream.scala
def mapPar[B](n: Int)(f: A => B)(implicit jtB: Infer[B]): Stream[E, B]

Applies f to each element using n concurrent workers. Output is UNORDERED (arrival order, not input order). On JVM, workers run on virtual threads. On JS, degrades to sequential map. n must be at least one; failure or cancellation stops the workers and closes upstream.

Applies f to each element using n concurrent workers. Output is UNORDERED (arrival order, not input order). On JVM, workers run on virtual threads. On JS, degrades to sequential map. n must be at least one; failure or cancellation stops the workers and closes upstream.

Value parameters

f

transformation to apply to each element

n

number of concurrent workers

Attributes

Source
Stream.scala
def mapParAsync[B](n: Int)(f: A => encoding.Async[B])(implicit jtB: Infer[B]): Stream[E, B]

Applies an asynchronous callback with at most n callbacks in flight. Results are emitted in completion order. n must be at least one; callback failure is a defect, and failure or cancellation stops all active callbacks and closes upstream.

Applies an asynchronous callback with at most n callbacks in flight. Results are emitted in completion order. n must be at least one; callback failure is a defect, and failure or cancellation stops all active callbacks and closes upstream.

Attributes

Source
Stream.scala
def orElse[E2, A2, A3](that: => Stream[E2, A2])(implicit valueConcat: WithOut[A, A2, A3], jtA3: Infer[A3]): Stream[E2, A3]

Falls back to that on the first typed error; defects are not handled. Alias: ||.

Falls back to that on the first typed error; defects are not handled. Alias: ||.

Attributes

Source
Stream.scala
def repeated: Stream[E, A]

Rematerializes this stream after each clean completion, producing an infinite repetition when a cycle emits elements. Typed errors and defects terminate repetition; closing the result closes the active cycle.

Rematerializes this stream after each clean completion, producing an infinite repetition when a cycle emits elements. Typed errors and defects terminate repetition; closing the result closes the active cycle.

Attributes

Source
Stream.scala
def runAsync[ES, E3, Z](sink: Sink[ES, A, Z])(implicit errorConcat: WithOut[E, ES, E3]): encoding.Async[Either[E3, Z]]

Runs this stream through the asynchronous drain of sink. Materialization and cleanup are lazy, cancellation-safe, and performed exactly once.

Runs this stream through the asynchronous drain of sink. Materialization and cleanup are lazy, cancellation-safe, and performed exactly once.

Attributes

Source
Stream.scala
def runCollectAsync: encoding.Async[Either[E, Chunk[A]]]

Runs the stream asynchronously and collects all elements in order. This requires memory proportional to the entire output and does not terminate for an infinite stream.

Runs the stream asynchronously and collects all elements in order. This requires memory proportional to the entire output and does not terminate for an infinite stream.

Attributes

Source
Stream.scala
def runDrainAsync: encoding.Async[Either[E, Unit]]

Runs the stream asynchronously, discarding all elements.

Runs the stream asynchronously, discarding all elements.

Attributes

Source
Stream.scala
def runFoldAsync(z: Double)(f: (Double, A) => encoding.Async[Double]): encoding.Async[Either[E, Double]]

Specialized asynchronous fold with a Double accumulator.

Specialized asynchronous fold with a Double accumulator.

Attributes

Source
Stream.scala
def runFoldAsync(z: Float)(f: (Float, A) => encoding.Async[Float]): encoding.Async[Either[E, Float]]

Specialized asynchronous fold with a Float accumulator.

Specialized asynchronous fold with a Float accumulator.

Attributes

Source
Stream.scala
def runFoldAsync(z: Int)(f: (Int, A) => encoding.Async[Int]): encoding.Async[Either[E, Int]]

Specialized asynchronous fold with an Int accumulator.

Specialized asynchronous fold with an Int accumulator.

Attributes

Source
Stream.scala
def runFoldAsync(z: Long)(f: (Long, A) => encoding.Async[Long]): encoding.Async[Either[E, Long]]

Specialized asynchronous fold with a Long accumulator.

Specialized asynchronous fold with a Long accumulator.

Attributes

Source
Stream.scala
def runFoldAsync[Z](z: Z)(f: (Z, A) => encoding.Async[Z])(implicit jtZ: Infer[Z]): encoding.Async[Either[E, Z]]

Runs the stream, folding sequentially with an asynchronous callback.

Runs the stream, folding sequentially with an asynchronous callback.

Attributes

Source
Stream.scala
def runForeachAsync(f: A => encoding.Async[Unit]): encoding.Async[Either[E, Unit]]

Runs the stream, applying the asynchronous callback sequentially.

Runs the stream, applying the asynchronous callback sequentially.

Attributes

Source
Stream.scala
def scan[S](init: S)(f: (S, A) => S)(implicit jtS: Infer[S]): Stream[E, S]

Emits the accumulator at each step, starting with init. The output stream has one more element than the input.

Emits the accumulator at each step, starting with init. The output stream has one more element than the input.

Attributes

Source
Stream.scala
def scanAsync[S](init: S)(f: (S, A) => encoding.Async[S])(implicit jtS: Infer[S]): Stream[E, S]

Asynchronously emits the accumulator at each step, starting with init. The output stream has one more element than the input.

Asynchronously emits the accumulator at each step, starting with init. The output stream has one more element than the input.

Attributes

Source
Stream.scala
def sliding(n: Int, step: Int = ...): Stream[E, Chunk[A]]

Emits sliding windows of up to n elements as Chunks, preserving order. Each window starts step elements after the previous one; gaps are skipped when step > n. One final partial window is emitted when it adds elements not present in the preceding window. Both arguments must be at least one.

Emits sliding windows of up to n elements as Chunks, preserving order. Each window starts step elements after the previous one; gaps are skipped when step > n. One final partial window is emitted when it adds elements not present in the preceding window. Both arguments must be at least one.

Attributes

Source
Stream.scala
def startAsync: encoding.Async[AsyncReader[A]]

Materializes this stream as a caller-owned asynchronous reader. The caller must drive and await close() on the published reader.

Materializes this stream as a caller-owned asynchronous reader. The caller must drive and await close() on the published reader.

Attributes

Source
Stream.scala
def take(n: Long): Stream[E, A]

Emits at most the first n elements, then closes upstream. n <= 0 yields an empty stream without pulling an element.

Emits at most the first n elements, then closes upstream. n <= 0 yields an empty stream without pulling an element.

Attributes

Source
Stream.scala
def takeWhile(pred: A => Boolean): Stream[E, A]

Emits elements while pred holds, then closes on the first element where pred returns false.

Emits elements while pred holds, then closes on the first element where pred returns false.

Attributes

Source
Stream.scala
def takeWhileAsync(pred: A => encoding.Async[Boolean]): Stream[E, A]

Tests elements sequentially and emits them while the asynchronous predicate holds, then closes upstream at the first false. Predicate failure is a defect.

Tests elements sequentially and emits them while the asynchronous predicate holds, then closes upstream at the first false. Predicate failure is a defect.

Attributes

Source
Stream.scala
def tapEach(f: A => Unit): Stream[E, A]

Applies f to each element for side-effects, passing the element through.

Applies f to each element for side-effects, passing the element through.

Attributes

Source
Stream.scala
def tapEachAsync(f: A => encoding.Async[Unit]): Stream[E, A]

Runs an asynchronous effect for each element and passes it through.

Runs an asynchronous effect for each element and passes it through.

Attributes

Source
Stream.scala
override def toString: String

Returns render.

Returns render.

Attributes

Definition Classes
Any
Source
Stream.scala
def useReaderAsync[Z](f: AsyncReader[A] => encoding.Async[Z]): encoding.Async[Z]

Uses an asynchronous reader and awaits its close on every outcome.

Uses an asynchronous reader and awaits its close on every outcome.

Attributes

Source
Stream.scala
final def via[B](pipe: Pipeline[A, B]): Stream[E, B]

Transforms this stream by applying a Pipeline.

Transforms this stream by applying a Pipeline.

Attributes

Source
Stream.scala
def ||[E2, A2, A3](that: => Stream[E2, A2])(implicit valueConcat: WithOut[A, A2, A3], jtA3: Infer[A3]): Stream[E2, A3]

Alias for orElse. The fallback stream is evaluated lazily, only on error.

Alias for orElse. The fallback stream is evaluated lazily, only on error.

Attributes

Source
Stream.scala

Inherited methods

def count: Either[E, Long]

Returns the number of emitted elements, or the stream's typed error.

Returns the number of emitted elements, or the stream's typed error.

Attributes

Inherited from:
StreamPlatformSpecific
Source
StreamPlatformSpecific.scala
def exists(pred: A => Boolean): Either[E, Boolean]

Tests whether any element satisfies pred, or returns the stream's typed error.

Tests whether any element satisfies pred, or returns the stream's typed error.

Attributes

Inherited from:
StreamPlatformSpecific
Source
StreamPlatformSpecific.scala
def find(pred: A => Boolean): Either[E, Option[A]]

Returns the first element satisfying pred, or None if no element does.

Returns the first element satisfying pred, or None if no element does.

Attributes

Inherited from:
StreamPlatformSpecific
Source
StreamPlatformSpecific.scala
def forall(pred: A => Boolean): Either[E, Boolean]

Tests whether every element satisfies pred, or returns the stream's typed error.

Tests whether every element satisfies pred, or returns the stream's typed error.

Attributes

Inherited from:
StreamPlatformSpecific
Source
StreamPlatformSpecific.scala
def foreach(f: A => Unit): Either[E, Unit]

Alias for runForeach.

Alias for runForeach.

Attributes

Inherited from:
StreamPlatformSpecific
Source
StreamPlatformSpecific.scala
def head: Either[E, Option[A]]

Returns the first element, or None if this stream is empty.

Returns the first element, or None if this stream is empty.

Attributes

Inherited from:
StreamPlatformSpecific
Source
StreamPlatformSpecific.scala
def last: Either[E, Option[A]]

Returns the last element, or None if this stream is empty.

Returns the last element, or None if this stream is empty.

Attributes

Inherited from:
StreamPlatformSpecific
Source
StreamPlatformSpecific.scala
def run[ES, E3, Z](sink: Sink[ES, A, Z])(implicit errorConcat: WithOut[E, ES, E3]): Either[E3, Z]

Runs this stream through sink, blocking until completion.

Runs this stream through sink, blocking until completion.

Attributes

Inherited from:
StreamPlatformSpecific
Source
StreamPlatformSpecific.scala
def runCollect: Either[E, Chunk[A]]

Collects all emitted elements into a Chunk, blocking until completion.

Collects all emitted elements into a Chunk, blocking until completion.

Attributes

Inherited from:
StreamPlatformSpecific
Source
StreamPlatformSpecific.scala
def runDrain: Either[E, Unit]

Consumes and discards all emitted elements, blocking until completion.

Consumes and discards all emitted elements, blocking until completion.

Attributes

Inherited from:
StreamPlatformSpecific
Source
StreamPlatformSpecific.scala
def runFold[Z](z: Z)(f: (Z, A) => Z)(implicit jtZ: Infer[Z]): Either[E, Z]

Folds emitted elements from z with f, blocking until completion.

Folds emitted elements from z with f, blocking until completion.

Attributes

Inherited from:
StreamPlatformSpecific
Source
StreamPlatformSpecific.scala
def runFold(z: Long)(f: (Long, A) => Long): Either[E, Long]

Folds emitted elements from z with f, blocking until completion.

Folds emitted elements from z with f, blocking until completion.

Attributes

Inherited from:
StreamPlatformSpecific
Source
StreamPlatformSpecific.scala
def runFold(z: Int)(f: (Int, A) => Int): Either[E, Int]

Folds emitted elements from z with f, blocking until completion.

Folds emitted elements from z with f, blocking until completion.

Attributes

Inherited from:
StreamPlatformSpecific
Source
StreamPlatformSpecific.scala
def runFold(z: Double)(f: (Double, A) => Double): Either[E, Double]

Folds emitted elements from z with f, blocking until completion.

Folds emitted elements from z with f, blocking until completion.

Attributes

Inherited from:
StreamPlatformSpecific
Source
StreamPlatformSpecific.scala
def runForeach(f: A => Unit): Either[E, Unit]

Applies f to every emitted element, blocking until completion.

Applies f to every emitted element, blocking until completion.

Attributes

Inherited from:
StreamPlatformSpecific
Source
StreamPlatformSpecific.scala
def start(implicit scope: Scope): scope.$[SyncReader[A]]

Materializes this stream as a scoped synchronous reader. Closing the scope closes the reader; asynchronous boundaries are bridged by the JVM runtime.

Materializes this stream as a scoped synchronous reader. Closing the scope closes the reader; asynchronous boundaries are bridged by the JVM runtime.

Attributes

Inherited from:
StreamPlatformSpecific
Source
StreamPlatformSpecific.scala