| 443 | } |
| 444 | |
| 445 | int HedgedConnections::getReadyFileDescriptor(AsyncCallback async_callback) |
| 446 | { |
| 447 | epoll_event event{}; |
| 448 | event.data.fd = -1; |
| 449 | size_t events_count = 0; |
| 450 | bool blocking = !static_cast<bool>(async_callback); |
| 451 | while (events_count == 0) |
| 452 | { |
| 453 | events_count = epoll.getManyReady(1, &event, blocking ? -1 : 0); |
| 454 | if (!events_count && async_callback) |
| 455 | async_callback(epoll.getFileDescriptor(), 0, AsyncEventTimeoutType::NONE, epoll.getDescription(), AsyncTaskExecutor::Event::READ | AsyncTaskExecutor::Event::ERROR); |
| 456 | } |
| 457 | return event.data.fd; |
| 458 | } |
| 459 | |
| 460 | Packet HedgedConnections::receivePacketFromReplica(const ReplicaLocation & replica_location) |
| 461 | { |
nothing calls this directly
no test coverage detected