| 224 | } |
| 225 | |
| 226 | void WaitUntilDone() { |
| 227 | if (num_readings_ != 0) { |
| 228 | PCHECK(syscall(__NR_io_getevents, ctx_, num_readings_, num_readings_, events_.data(), nullptr) |
| 229 | >= 0); |
| 230 | for (long i = 0; i < num_readings_; ++i) { CHECK_GT(events_.at(i).res, 0); } |
| 231 | num_readings_ = 0; |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | private: |
| 236 | aio_context_t ctx_; |
no test coverage detected