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

Function asyncQueue

repos/effect/packages/effect/src/Channel.ts:447–461  ·  view source on GitHub ↗
(
  scope: Scope.Scope,
  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

445 *
446 * **Example** (Reading the default chunk size)
447 *
448 * ```ts import.meta.vitest
449 * import { Channel } from "effect"
450 *
451 * Channel.DefaultChunkSize // => 4096
452 * ```
453 *
454 * @category constants
455 * @since 4.0.0
456 */
457export const DefaultChunkSize: number = 4096
458
459const asyncQueue = <A, E = never, R = never>(
460 scope: Scope.Scope,
461 f: (queue: Queue.Queue<A, E | Cause.Done>) => Effect.Effect<unknown, E, R | Scope.Scope>,
462 options?: {
463 readonly bufferSize?: number | undefined
464 readonly strategy?: "sliding" | "dropping" | "suspend" | undefined

Callers 2

callbackFunction · 0.85
callbackArrayFunction · 0.85

Calls 6

addFinalizerMethod · 0.80
pipeMethod · 0.65
makeMethod · 0.65
fFunction · 0.50
shutdownMethod · 0.45
provideMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…