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

Function dropping

packages/effect/src/PubSub.ts:381–390  ·  view source on GitHub ↗
(
  capacity: number | {
    readonly capacity: number
    readonly replay?: number | undefined
  }
)

Source from the content-addressed store, hash-verified

379 * @since 2.0.0
380 */
381export const dropping = <A>(
382 capacity: number | {
383 readonly capacity: number
384 readonly replay?: number | undefined
385 }
386): Effect.Effect<PubSub<A>> =>
387 make({
388 atomicPubSub: () => makeAtomicBounded(capacity),
389 strategy: () => new DroppingStrategy()
390 })
391
392/**
393 * Creates a bounded `PubSub` with the sliding strategy. The `PubSub` will add new

Callers

nothing calls this directly

Calls 2

makeAtomicBoundedFunction · 0.85
makeFunction · 0.70

Tested by

no test coverage detected