Function BlockingQueue.close
Closes producer admission and wakes every blocked consumer.
bool close();
Values already queued remain available to waitPop in FIFO order.
Returns
true exactly for the first open-to-closed transition; false when
the queue was already closed.
Thread Safety
May run concurrently with producers and consumers. Once the transition
succeeds, all later tryPush calls return closed.