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

Function makeTxPubSub

packages/effect/src/TxPubSub.ts:82–95  ·  view source on GitHub ↗
(
  subscribersRef: TxRef.TxRef<Array<TxQueue.TxQueue<A>>>,
  shutdownRef: TxRef.TxRef<boolean>,
  strategy: "bounded" | "unbounded" | "dropping" | "sliding",
  cap: number
)

Source from the content-addressed store, hash-verified

80}
81
82const makeTxPubSub = <A>(
83 subscribersRef: TxRef.TxRef<Array<TxQueue.TxQueue<A>>>,
84 shutdownRef: TxRef.TxRef<boolean>,
85 strategy: "bounded" | "unbounded" | "dropping" | "sliding",
86 cap: number
87): TxPubSub<A> => {
88 const self = Object.create(TxPubSubProto)
89 self[TypeId] = TypeId
90 self.subscribersRef = subscribersRef
91 self.shutdownRef = shutdownRef
92 self.strategy = strategy
93 self.capacity = cap
94 return self
95}
96
97// =============================================================================
98// Constructors

Callers 4

boundedFunction · 0.85
droppingFunction · 0.85
slidingFunction · 0.85
unboundedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected