| 93 | } |
| 94 | |
| 95 | std::pair<int, pn_event_type_t> proactor::flush(pn_event_type_t stop) { |
| 96 | auto_batch b(*this, pn_proactor_get(*this)); |
| 97 | int n = 0; |
| 98 | if (b.get()) { |
| 99 | pn_event_t *e; |
| 100 | while ((e = b.next())) { |
| 101 | pn_event_type_t et = pn_event_type(e); |
| 102 | if (dispatch(e) || et == stop) return std::make_pair(n, et); |
| 103 | } |
| 104 | } |
| 105 | return std::make_pair(n, PN_EVENT_NONE); |
| 106 | } |
| 107 | |
| 108 | pn_event_type_t proactor::corun(proactor &other, pn_event_type_t stop) { |
| 109 | // We can't wait() on either proactor as it might be idle. |
no test coverage detected