Add a `close()` method to queues
getify opened this issue · comments
Kyle Simpson commented
Calling close()
on a queue closes it immediately, so that any further calls to that queue's push()
will throw, and any calls to its next()
will return functions that produce the RevocableQueue.EMPTY
value.
This will be useful for an async-iterator wrapped around the queue.