Package: effect
Module: Stream
Converts the stream to a scoped queue of chunks. After the scope is closed, the queue will never again produce values and should be discarded.
Defaults to the “suspend” back pressure strategy with a capacity of 2.
Signature
declare const toQueue: { (options?: { readonly strategy?: "dropping" | "sliding" | "suspend" | undefined; readonly capacity?: number | undefined; } | { readonly strategy: "unbounded"; } | undefined): <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<Queue.Dequeue<Take.Take<A, E>>, never, Scope.Scope | R>; <A, E, R>(self: Stream<A, E, R>, options?: { readonly strategy?: "dropping" | "sliding" | "suspend" | undefined; readonly capacity?: number | undefined; } | { readonly strategy: "unbounded"; } | undefined): Effect.Effect<Queue.Dequeue<Take.Take<A, E>>, never, Scope.Scope | R>; }
Since v2.0.0