X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/6623ac357055b95ce4fc0cbe9c5dc15524a9f20c..c279db4240a3a3c30f069ab9dea8055cf94280da:/rpc/poll_mgr.h diff --git a/rpc/poll_mgr.h b/rpc/poll_mgr.h index bd451cf..6fe66c0 100644 --- a/rpc/poll_mgr.h +++ b/rpc/poll_mgr.h @@ -17,7 +17,7 @@ class aio_callback { public: virtual void read_cb(int fd) = 0; virtual void write_cb(int fd) = 0; - virtual ~aio_callback() {} + virtual ~aio_callback(); }; class poll_mgr { @@ -25,18 +25,17 @@ class poll_mgr { poll_mgr(); ~poll_mgr(); - static poll_mgr shared_mgr; - void add_callback(int fd, poll_flag flag, aio_callback *ch); void del_callback(int fd, poll_flag flag); void block_remove_fd(int fd); void wait_loop(); + void shutdown(); private: - mutex m_; + std::mutex m_; cond changedone_c_; - map callbacks_; + std::map callbacks_; unique_ptr aio_; bool pending_change_=false, shutdown_=false;