| 172 | |
| 173 | |
| 174 | void RequiresQueue::ClearAll() noexcept |
| 175 | { |
| 176 | reqids.clear(); |
| 177 | slots.clear(); |
| 178 | try |
| 179 | { |
| 180 | slots.shrink_to_fit(); |
| 181 | } |
| 182 | catch (...) |
| 183 | { |
| 184 | // We ignore errors in this case. |
| 185 | // If this fails, we use spend a bit |
| 186 | // more memory than strictly needed. |
| 187 | std::cerr << "RequiresQueue::ClearAll() failed. Ignored." << std::endl; |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | uint32_t RequiresQueue::RequireAdd(ClientAttentionType type, |
| 192 | ClientAttentionGroup group, |