Unify accept and network threads into io threads

This commit is contained in:
2025-08-20 16:50:54 -04:00
parent 7e28e6503d
commit 130ff2062a
10 changed files with 157 additions and 216 deletions

View File

@@ -105,21 +105,18 @@ private:
// Shutdown coordination
int shutdown_pipe_[2] = {-1, -1};
// Epoll file descriptors
int network_epollfd_ = -1;
int accept_epollfd_ = -1;
// Epoll file descriptor
int epollfd_ = -1;
int listen_sockfd_ = -1;
// Private helper methods
void setup_shutdown_pipe();
void setup_signal_handling();
int create_listen_socket();
void start_network_threads();
void start_accept_threads();
void start_io_threads();
void cleanup_resources();
// Helper for processing connection I/O (shared between accept and network
// threads)
// Helper for processing connection I/O
bool process_connection_io(std::unique_ptr<Connection> &conn, int events);
/**