大在在

作者: asialine | 来源:发表于2017-12-20 17:16 被阅读0次

    ···c++

    struct Loop { 

    int epfd;

     int numPolls = 0;

    bool cancelledLastTimer;

     int delay = -1; epoll_event readyEvents[1024]; std::chrono::system_clock::time_point timepoint; std::vector timers; std::vector> closing; void (*preCb)(void *) = nullptr; void (*postCb)(void *) = nullptr; void *preCbData, *postCbData; Loop(bool defaultLoop) { epfd = epoll_create1(EPOLL_CLOEXEC);timepoint = std::chrono::system_clock::now(); } static Loop *createLoop(bool defaultLoop = true) { return new Loop(defaultLoop); } void destroy() { ::close(epfd); delete this; }

    ···

    ## 舸

    相关文章

      网友评论

          本文标题:大在在

          本文链接:https://www.haomeiwen.com/subject/yltnwxtx.html