MCPcopy Create free account
hub / github.com/Effect-TS/effect / unbounded

Function unbounded

packages/effect/src/TxQueue.ts:404–415  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

402 * @since 2.0.0
403 */
404export const unbounded = <A = never, E = never>(): Effect.Effect<TxQueue<A, E>> =>
405 Effect.gen(function*() {
406 const items = yield* TxChunk.empty<A>()
407 const stateRef = yield* TxRef.make<State<A, E>>({ _tag: "Open" })
408
409 const txQueue = Object.create(TxQueueProto)
410 txQueue.strategy = "unbounded"
411 txQueue.capacity = Number.POSITIVE_INFINITY
412 txQueue.items = items
413 txQueue.stateRef = stateRef
414 return txQueue
415 }).pipe(Effect.tx)
416
417/**
418 * Creates a new dropping `TxQueue` with the specified capacity that drops new items when full.

Callers

nothing calls this directly

Calls 2

pipeMethod · 0.65
makeMethod · 0.65

Tested by

no test coverage detected