import { Queue } from "https://deno.land/x/workerio@v2.0.0/deps.ts";
A first in, first out (FIFO) queue. Non thread-safe.
If maxsize is less than or equal to zero, the queue size is infinite. If it is an integer greater than 0, then await put() blocks when the queue reaches maxsize until an item is removed by get().
Not like Python asyncio's Queue, join()/task_done() methods are not implemented.
Methods
full(): boolean
Return true
if there are maxsize
items in the queue.
If the queue was initialized with maxsize=0 (the default), then
full()
never returns true
.
Put an item into the queue. If the queue is full, wait until a free slot is available before adding the item.
put_nowait(value: T): void
Put an item into the queue without blocking. If no free slot is immediately available, throw a QueueFull error.