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

Function useQueue

packages/effect/src/Stream.ts:8989–8996  ·  view source on GitHub ↗
(key, offer)

Source from the content-addressed store, hash-verified

8987 }).pipe(Scope.provide(forkedScope))
8988
8989 const useQueue: UseGroupQueue<K, V> = (key, offer) => {
8990 if (!canExpire) {
8991 const existing = MutableHashMap.get(queueMap, key)
8992 if (Option.isSome(existing)) return offer(existing.value)
8993 }
8994 // Keep the group alive until the offer has been accepted or cancelled.
8995 return Effect.scoped(Effect.flatMap(RcMap.get(queues, key), offer))
8996 }
8997
8998 yield* Effect.whileLoop({
8999 while: constTrue,

Callers 1

Stream.tsFile · 0.85

Calls 2

getMethod · 0.65
offerFunction · 0.50

Tested by

no test coverage detected