17#ifndef CYBER_IO_POLLER_H_
18#define CYBER_IO_POLLER_H_
25#include <unordered_map>
52 void Poll(
int timeout_ms);
60 std::atomic<bool> is_shutdown_ = {
true};
62 int pipe_fd_[2] = {-1, -1};
63 std::mutex pipe_mutex_;
69 const int kPollSize = 32;
70 const int kPollTimeoutMs = 100;
bool Unregister(const PollRequest &req)
std::unordered_map< int, RequestPtr > RequestMap
std::unordered_map< int, PollCtrlParam > CtrlParamMap
bool Register(const PollRequest &req)
std::shared_ptr< PollRequest > RequestPtr
#define DECLARE_SINGLETON(classname)