class Async::PriorityQueue

def close

Any subsequent calls to {enqueue} will raise an exception.
Close the queue, causing all waiting tasks to return `nil`.
def close
	@mutex.synchronize do
		@closed = true
		
		# Signal all waiting fibers with nil, skipping dead/invalid ones:
		while waiter = @waiting.pop
			waiter.signal(nil)
		end
	end
end