Function
makeTxPubSub
(
subscribersRef: TxRef.TxRef<Array<TxQueue.TxQueue<A>>>,
shutdownRef: TxRef.TxRef<boolean>,
strategy: "bounded" | "unbounded" | "dropping" | "sliding",
cap: number
)
Source from the content-addressed store, hash-verified
| 80 | } |
| 81 | |
| 82 | const makeTxPubSub = <A>( |
| 83 | subscribersRef: TxRef.TxRef<Array<TxQueue.TxQueue<A>>>, |
| 84 | shutdownRef: TxRef.TxRef<boolean>, |
| 85 | strategy: "bounded" | "unbounded" | "dropping" | "sliding", |
| 86 | cap: number |
| 87 | ): TxPubSub<A> => { |
| 88 | const self = Object.create(TxPubSubProto) |
| 89 | self[TypeId] = TypeId |
| 90 | self.subscribersRef = subscribersRef |
| 91 | self.shutdownRef = shutdownRef |
| 92 | self.strategy = strategy |
| 93 | self.capacity = cap |
| 94 | return self |
| 95 | } |
| 96 | |
| 97 | // ============================================================================= |
| 98 | // Constructors |
Tested by
no test coverage detected