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

Function take

packages/effect/src/Queue.ts:1420–1423  ·  view source on GitHub ↗
(self: Dequeue<A, E>)

Source from the content-addressed store, hash-verified

1418 * @since 2.0.0
1419 */
1420export const take = <A, E>(self: Dequeue<A, E>): Effect<A, E> =>
1421 internalEffect.suspend(
1422 () => takeUnsafe(self) ?? internalEffect.andThen(awaitTake(self), take(self))
1423 )
1424
1425/**
1426 * Attempts to take one item from the queue without waiting.

Callers

nothing calls this directly

Calls 2

takeUnsafeFunction · 0.85
awaitTakeFunction · 0.85

Tested by

no test coverage detected