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

Function unsafeMakeSubscription

packages/effect/src/internal/pubsub.ts:201–219  ·  view source on GitHub ↗
(
  pubsub: AtomicPubSub<A>,
  subscribers: Subscribers<A>,
  subscription: Subscription<A>,
  pollers: MutableQueue.MutableQueue<Deferred.Deferred<A>>,
  shutdownHook: Deferred.Deferred<void>,
  shutdownFlag: MutableRef.MutableRef<boolean>,
  strategy: PubSubStrategy<A>
)

Source from the content-addressed store, hash-verified

199
200/** @internal */
201export const unsafeMakeSubscription = <A>(
202 pubsub: AtomicPubSub<A>,
203 subscribers: Subscribers<A>,
204 subscription: Subscription<A>,
205 pollers: MutableQueue.MutableQueue<Deferred.Deferred<A>>,
206 shutdownHook: Deferred.Deferred<void>,
207 shutdownFlag: MutableRef.MutableRef<boolean>,
208 strategy: PubSubStrategy<A>
209): Queue.Dequeue<A> =>
210 new SubscriptionImpl(
211 pubsub,
212 subscribers,
213 subscription,
214 pollers,
215 shutdownHook,
216 shutdownFlag,
217 strategy,
218 pubsub.replayWindow()
219 )
220
221/** @internal */
222class BoundedPubSubArb<in out A> implements AtomicPubSub<A> {

Callers 1

makeSubscriptionFunction · 0.85

Calls 1

replayWindowMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…