interface Queue
thefrontside/effectioninterface Queue<T, TClose> extends Subscription<T, TClose>
A FIFO queue which can be used to implement the https://effection-www-jctyb5nxhzq0.deno.dev/api/v3/Queue/Subscription
interface directly. Most of the time, you will use either a https://effection-www-jctyb5nxhzq0.deno.dev/api/v3/Queue/Signal
or a https://effection-www-jctyb5nxhzq0.deno.dev/api/v3/Queue/Channel as the mechanism, but Queue
allows you to manage
a single subscription directly.
Type Parameters
T the type of the items in the queue
TClose the type of the value that the queue is closed with
Methods
- add(item: T): void
Add a value to the queue. The oldest value currently in the queue will be the first to be read.
- close(value: TClose): void
Close the queue.