| 832 | } |
| 833 | |
| 834 | int fini() { |
| 835 | loop->stop(); |
| 836 | if (epfd > 0) { |
| 837 | close(epfd); |
| 838 | epfd = 0; |
| 839 | } |
| 840 | delete loop; |
| 841 | loop = nullptr; |
| 842 | return 0; |
| 843 | } |
| 844 | |
| 845 | int waiter(EventLoop*) { |
| 846 | auto ret = photon::wait_for_fd_readable(epfd, 1 * 1000UL); |