Shuts down the queue. When a blocking queue is shut down, no more elements can be added to it, and Put() will return QUEUE_SHUTDOWN. Existing elements will drain out of it, and then BlockingGet will start returning false.
| 215 | // Existing elements will drain out of it, and then BlockingGet will start |
| 216 | // returning false. |
| 217 | void Shutdown() { |
| 218 | MutexLock l(lock_); |
| 219 | shutdown_ = true; |
| 220 | not_full_.Broadcast(); |
| 221 | not_empty_.Broadcast(); |
| 222 | } |
| 223 | |
| 224 | bool empty() const { |
| 225 | MutexLock l(lock_); |