| 2506 | } |
| 2507 | |
| 2508 | class PubSubImpl<in out A> implements PubSub<A> { |
| 2509 | readonly [TypeId] = { |
| 2510 | _A: identity |
| 2511 | } |
| 2512 | |
| 2513 | readonly pubsub: PubSub.Atomic<A> |
| 2514 | readonly subscribers: PubSub.Subscribers<A> |
| 2515 | readonly scope: Scope.Closeable |
| 2516 | readonly shutdownHook: Latch.Latch |
| 2517 | readonly shutdownFlag: MutableRef.MutableRef<boolean> |
| 2518 | readonly strategy: PubSub.Strategy<A> |
| 2519 | readonly ended: MutableRef.MutableRef<Option.Option<A>> |
| 2520 | |
| 2521 | constructor( |
| 2522 | pubsub: PubSub.Atomic<A>, |
| 2523 | subscribers: PubSub.Subscribers<A>, |
| 2524 | scope: Scope.Closeable, |
| 2525 | shutdownHook: Latch.Latch, |
| 2526 | shutdownFlag: MutableRef.MutableRef<boolean>, |
| 2527 | strategy: PubSub.Strategy<A>, |
| 2528 | ended: MutableRef.MutableRef<Option.Option<A>> |
| 2529 | ) { |
| 2530 | this.pubsub = pubsub |
| 2531 | this.subscribers = subscribers |
| 2532 | this.scope = scope |
| 2533 | this.shutdownHook = shutdownHook |
| 2534 | this.shutdownFlag = shutdownFlag |
| 2535 | this.strategy = strategy |
| 2536 | this.ended = ended |
| 2537 | } |
| 2538 | |
| 2539 | pipe() { |
| 2540 | return pipeArguments(this, arguments) |
| 2541 | } |
| 2542 | } |
| 2543 | |
| 2544 | const makePubSubUnsafe = <A>( |
| 2545 | pubsub: PubSub.Atomic<A>, |
nothing calls this directly
no outgoing calls
no test coverage detected