| 128 | class SocketThread { |
| 129 | public: |
| 130 | SocketThread(int fd) : fd_(fd), stop_(false) { |
| 131 | worker_ = std::thread(&SocketThread::worker, this); |
| 132 | int flags = fcntl(fd, F_GETFL, 0); |
| 133 | fcntl(fd, F_SETFL, flags | O_NONBLOCK); |
| 134 | } |
| 135 | ~SocketThread() { |
| 136 | stop_ = true; |
| 137 | condition_.notify_all(); |
nothing calls this directly
no outgoing calls
no test coverage detected