| 485 | } |
| 486 | |
| 487 | void* wait_for_the_fd(void* arg) { |
| 488 | timespec ts = butil::milliseconds_from_now(50); |
| 489 | #if defined(OS_LINUX) |
| 490 | bthread_fd_timedwait(*(int*)arg, EPOLLIN, &ts); |
| 491 | #elif defined(OS_MACOSX) |
| 492 | bthread_fd_timedwait(*(int*)arg, EVFILT_READ, &ts); |
| 493 | #endif |
| 494 | return NULL; |
| 495 | } |
| 496 | |
| 497 | TEST(FDTest, timeout) { |
| 498 | int fds[2]; |
nothing calls this directly
no test coverage detected