Package: effect
Module: TxQueue
Checks whether the queue is in the closing state.
Example (Checking closing state)
import { Effect, TxQueue } from "effect"
const program = Effect.gen(function*() {
const queue = yield* TxQueue.bounded<number>(10)
yield* TxQueue.offer(queue, 42)
const closing = yield* TxQueue.isClosing(queue)
console.log(closing) // false
yield* TxQueue.interrupt(queue)
const nowClosing = yield* TxQueue.isClosing(queue)
console.log(nowClosing) // true
})
Signature
declare const isClosing: (self: TxQueueState) => Effect.Effect<boolean>
Since v4.0.0