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

Class SubscriptionImpl

packages/effect/src/PubSub.ts:2241–2278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2239}
2240
2241class SubscriptionImpl<in out A> implements Subscription<A> {
2242 readonly [SubscriptionTypeId] = {
2243 _A: identity
2244 }
2245
2246 readonly pubsub: PubSub.Atomic<A>
2247 readonly subscribers: PubSub.Subscribers<A>
2248 readonly subscription: PubSub.BackingSubscription<A>
2249 readonly pollers: MutableList.MutableList<Deferred.Deferred<A>>
2250 readonly shutdownHook: Latch.Latch
2251 readonly shutdownFlag: MutableRef.MutableRef<boolean>
2252 readonly strategy: PubSub.Strategy<A>
2253 readonly replayWindow: PubSub.ReplayWindow<A>
2254
2255 constructor(
2256 pubsub: PubSub.Atomic<A>,
2257 subscribers: PubSub.Subscribers<A>,
2258 subscription: PubSub.BackingSubscription<A>,
2259 pollers: MutableList.MutableList<Deferred.Deferred<A>>,
2260 shutdownHook: Latch.Latch,
2261 shutdownFlag: MutableRef.MutableRef<boolean>,
2262 strategy: PubSub.Strategy<A>,
2263 replayWindow: PubSub.ReplayWindow<A>
2264 ) {
2265 this.pubsub = pubsub
2266 this.subscribers = subscribers
2267 this.subscription = subscription
2268 this.pollers = pollers
2269 this.shutdownHook = shutdownHook
2270 this.shutdownFlag = shutdownFlag
2271 this.strategy = strategy
2272 this.replayWindow = replayWindow
2273 }
2274
2275 pipe() {
2276 return pipeArguments(this, arguments)
2277 }
2278}
2279
2280class PubSubImpl<in out A> implements PubSub<A> {
2281 readonly [TypeId] = {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected