Function
make
(
options: {
readonly atomicPubSub: LazyArg<PubSub.Atomic<A>>
readonly strategy: LazyArg<PubSub.Strategy<A>>
}
)
Source from the content-addressed store, hash-verified
| 276 | * @since 4.0.0 |
| 277 | */ |
| 278 | export const make = <A>( |
| 279 | options: { |
| 280 | readonly atomicPubSub: LazyArg<PubSub.Atomic<A>> |
| 281 | readonly strategy: LazyArg<PubSub.Strategy<A>> |
| 282 | } |
| 283 | ): Effect.Effect<PubSub<A>> => |
| 284 | Effect.sync(() => |
| 285 | makePubSubUnsafe( |
| 286 | options.atomicPubSub(), |
| 287 | new Map(), |
| 288 | Scope.makeUnsafe(), |
| 289 | Latch.makeUnsafe(false), |
| 290 | MutableRef.make(false), |
| 291 | options.strategy() |
| 292 | ) |
| 293 | ) |
| 294 | |
| 295 | /** |
| 296 | * Creates a bounded `PubSub` that applies backpressure when it reaches |
Tested by
no test coverage detected