MCPcopy Create free account
hub / github.com/effect-app/libs / callback

Function callback

repos/effect/packages/effect/src/Stream.ts:777–783  ·  view source on GitHub ↗
(
  f: (queue: Queue.Queue<A, E | Cause.Done>) => Effect.Effect<unknown, E, R | Scope.Scope>,
  options?: {
    readonly bufferSize?: number | undefined
    readonly strategy?: "sliding" | "dropping" | "suspend" | undefined
  }
)

Source from the content-addressed store, hash-verified

775 * **Details**
776 *
777 * The stream factory is evaluated each time the stream is run.
778 *
779 * **Example** (Creating a lazily constructed stream)
780 *
781 * ```ts import.meta.vitest
782 * import { Effect, Stream } from "effect"
783 *
784 * await Effect.runPromise(Stream.suspend(() => Stream.make(1, 2, 3)).pipe(Stream.runCollect)) // => [1, 2, 3]
785 * ```
786 *

Callers 13

Effect.tsFile · 0.70
fromEventListenerFunction · 0.70
connectMethod · 0.50
beginTransactionMethod · 0.50
commitTransactionMethod · 0.50
saveTransactionMethod · 0.50
rollbackTransactionMethod · 0.50
constructFunction · 0.50
writeFunction · 0.50
destroyFunction · 0.50
transformFunction · 0.50
writeFunction · 0.50

Calls 1

fromChannelFunction · 0.70

Tested by 10

connectMethod · 0.40
beginTransactionMethod · 0.40
commitTransactionMethod · 0.40
saveTransactionMethod · 0.40
rollbackTransactionMethod · 0.40
constructFunction · 0.40
writeFunction · 0.40
destroyFunction · 0.40
transformFunction · 0.40
writeFunction · 0.40

Used in the wild real call sites across dependent graphs

searching dependent graphs…