| 262 | } |
| 263 | |
| 264 | int HedgedConnectionsFactory::getReadyFileDescriptor(bool blocking, AsyncCallback & async_callback) |
| 265 | { |
| 266 | epoll_event event{}; |
| 267 | event.data.fd = -1; |
| 268 | if (!blocking) |
| 269 | { |
| 270 | epoll.getManyReady(1, &event, false); |
| 271 | return event.data.fd; |
| 272 | } |
| 273 | |
| 274 | size_t events_count = 0; |
| 275 | while (events_count == 0) |
| 276 | { |
| 277 | events_count = epoll.getManyReady(1, &event, !static_cast<bool>(async_callback)); |
| 278 | if (!events_count && async_callback) |
| 279 | async_callback(epoll.getFileDescriptor(), 0, AsyncEventTimeoutType::NONE, epoll.getDescription(), AsyncTaskExecutor::Event::READ | AsyncTaskExecutor::Event::ERROR); |
| 280 | } |
| 281 | return event.data.fd; |
| 282 | } |
| 283 | |
| 284 | HedgedConnectionsFactory::State HedgedConnectionsFactory::resumeConnectionEstablisher(int index, Connection *& connection_out) |
| 285 | { |
nothing calls this directly
no test coverage detected