epoll per thd

This commit is contained in:
Nicholas Orlowsky 2025-02-22 00:52:30 -05:00
parent 409024e04a
commit 6c5feb8675
4 changed files with 61 additions and 74 deletions

View file

@ -17,7 +17,7 @@ namespace anthracite::thread_mgr {
std::chrono::time_point<std::chrono::high_resolution_clock>& timestamp();
};
int _epoll_fd;
std::vector<int> _epoll_fds;
std::mutex _event_mtx;
std::condition_variable _event_cv;
std::queue<event> _events;
@ -26,7 +26,7 @@ namespace anthracite::thread_mgr {
void worker_thread_loop(int threadno);
void listener_thread_loop(config::http_config& http_config);
void eventer_thread_loop();
bool event_handler(event& ev);
bool event_handler(socket::anthracite_socket*);
public:
event_loop(backends::backend& backend, config::config& config);