| 305 | } |
| 306 | |
| 307 | bool pop ( |
| 308 | msg_data& item |
| 309 | ) |
| 310 | /*! |
| 311 | ensures |
| 312 | - if (this function returns true) then |
| 313 | - #item == the next thing from the queue |
| 314 | - else |
| 315 | - this object is disabled |
| 316 | !*/ |
| 317 | { |
| 318 | auto_mutex lock(class_mutex); |
| 319 | while (data.size() == 0 && !disabled) |
| 320 | sig.wait(); |
| 321 | |
| 322 | if (disabled) |
| 323 | return false; |
| 324 | |
| 325 | item = data.top().data; |
| 326 | data.pop(); |
| 327 | |
| 328 | return true; |
| 329 | } |
| 330 | |
| 331 | bool pop ( |
| 332 | msg_data& item, |
no test coverage detected