()
| 2108 | } |
| 2109 | |
| 2110 | slide(): void { |
| 2111 | if (this.publisherHead !== this.publisherTail) { |
| 2112 | const node = this.publisherHead.next! |
| 2113 | const value = node.value as A |
| 2114 | this.publisherHead = this.publisherHead.next! |
| 2115 | this.publisherHead.value = AbsentValue |
| 2116 | this.subscribersIndex += 1 |
| 2117 | this.replayBuffer?.slide(value, node.replayIndex!) |
| 2118 | } |
| 2119 | } |
| 2120 | |
| 2121 | subscribe(): PubSub.BackingSubscription<A> { |
| 2122 | this.publisherTail.subscribers += 1 |