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

Class SubscriptionImpl

packages/effect/src/PubSub.ts:2466–2506  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2464}
2465
2466class SubscriptionImpl<in out A> implements Subscription<A> {
2467 readonly [SubscriptionTypeId] = {
2468 _A: identity
2469 }
2470
2471 readonly pubsub: PubSub.Atomic<A>
2472 readonly subscribers: PubSub.Subscribers<A>
2473 readonly subscription: PubSub.BackingSubscription<A>
2474 readonly pollers: MutableList.MutableList<Deferred.Deferred<A>>
2475 readonly shutdownHook: Latch.Latch
2476 readonly shutdownFlag: MutableRef.MutableRef<boolean>
2477 readonly strategy: PubSub.Strategy<A>
2478 readonly replayWindow: PubSub.ReplayWindow<A>
2479 readonly ended: MutableRef.MutableRef<Option.Option<A>>
2480
2481 constructor(
2482 pubsub: PubSub.Atomic<A>,
2483 subscribers: PubSub.Subscribers<A>,
2484 subscription: PubSub.BackingSubscription<A>,
2485 pollers: MutableList.MutableList<Deferred.Deferred<A>>,
2486 shutdownHook: Latch.Latch,
2487 shutdownFlag: MutableRef.MutableRef<boolean>,
2488 strategy: PubSub.Strategy<A>,
2489 replayWindow: PubSub.ReplayWindow<A>,
2490 ended: MutableRef.MutableRef<Option.Option<A>>
2491 ) {
2492 this.pubsub = pubsub
2493 this.subscribers = subscribers
2494 this.subscription = subscription
2495 this.pollers = pollers
2496 this.shutdownHook = shutdownHook
2497 this.shutdownFlag = shutdownFlag
2498 this.strategy = strategy
2499 this.replayWindow = replayWindow
2500 this.ended = ended
2501 }
2502
2503 pipe() {
2504 return pipeArguments(this, arguments)
2505 }
2506}
2507
2508class PubSubImpl<in out A> implements PubSub<A> {
2509 readonly [TypeId] = {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected