If the queue holds a bare pointer, it must be empty on destruction, since it may have ownership of the pointer.
| 68 | // If the queue holds a bare pointer, it must be empty on destruction, since |
| 69 | // it may have ownership of the pointer. |
| 70 | ~BlockingQueue() { |
| 71 | DCHECK(queue_.empty() || !std::is_pointer<T>::value) |
| 72 | << "BlockingQueue holds bare pointers at destruction time"; |
| 73 | } |
| 74 | |
| 75 | // Gets an element from the queue; if the queue is empty, blocks until the |
| 76 | // queue becomes non-empty, or until the deadline passes. |