| 612 | */ |
| 613 | template<typename OnItemFunction> |
| 614 | inline int run(OnItemFunction on_item_function) { |
| 615 | int rc = 0; |
| 616 | do { |
| 617 | ObjectType item; |
| 618 | queue_->wait_dequeue(item); |
| 619 | if (item == quit_item) { |
| 620 | break; |
| 621 | } |
| 622 | rc = on_item_function(item); |
| 623 | if (rc) { |
| 624 | break; |
| 625 | } |
| 626 | } while (true); |
| 627 | return rc; |
| 628 | } |
| 629 | |
| 630 | private: |
| 631 | /*! \brief The blocking queue associated with this thread */ |
nothing calls this directly
no test coverage detected