| 402 | * @since 2.0.0 |
| 403 | */ |
| 404 | export const unbounded = <A = never, E = never>(): Effect.Effect<TxQueue<A, E>> => |
| 405 | Effect.gen(function*() { |
| 406 | const items = yield* TxChunk.empty<A>() |
| 407 | const stateRef = yield* TxRef.make<State<A, E>>({ _tag: "Open" }) |
| 408 | |
| 409 | const txQueue = Object.create(TxQueueProto) |
| 410 | txQueue.strategy = "unbounded" |
| 411 | txQueue.capacity = Number.POSITIVE_INFINITY |
| 412 | txQueue.items = items |
| 413 | txQueue.stateRef = stateRef |
| 414 | return txQueue |
| 415 | }).pipe(Effect.tx) |
| 416 | |
| 417 | /** |
| 418 | * Creates a new dropping `TxQueue` with the specified capacity that drops new items when full. |