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

Function failCauseUnsafe

repos/effect/packages/effect/src/Queue.ts:924–939  ·  view source on GitHub ↗
(self: Enqueue<A, E>, cause: Cause<E>)

Source from the content-addressed store, hash-verified

922 * Fails the queue with a cause synchronously. If the queue is already done, `false` is
923 * returned.
924 *
925 * **When to use**
926 *
927 * Use when queue completion must be driven from synchronous internals while
928 * preserving the full failure `Cause`.
929 *
930 * **Gotchas**
931 *
932 * This is an unsafe operation that directly modifies the queue without Effect wrapping.
933 *
934 * **Example** (Failing queues with a cause synchronously)
935 *
936 * ```ts import.meta.vitest
937 * import { Cause, Effect, Exit, Queue } from "effect"
938 *
939 * const program = Effect.gen(function*() {
940 * const queue = yield* Queue.bounded<number, string>(10)
941 *
942 * // Create a cause and fail the queue synchronously

Callers 2

Queue.tsFile · 0.85
endUnsafeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…