We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
大佬,说的不对的话,请帮忙指出来
http 读事件,不要把 EPOLLONESHOT 注册到 epoll 上。 每个 http 请求的处理都是单线程的,处理完每次 http 事件后,根据 old_event 和 new_event,比对一下(当前最新版本是没有对比的,都是 EPOLL_CTL_MOD,关于事件的二次注册这块目前写的感觉有点乱),来确定 EPOLL_CTL_MOD EPOLL_CTL_ADD EPOLL_CTL_DEL 或者不操作。这样能减少系统调用 epoll_ctl
小根堆定时器那里,我觉得最好使用 epoll_wait + 小根堆来实现,用小根堆的最小时间 timeout 来唤醒 epoll_wait,唤醒后,堆顶结点肯定超时了,libevent 就是这么做的
The text was updated successfully, but these errors were encountered:
No branches or pull requests
大佬,说的不对的话,请帮忙指出来
http 读事件,不要把 EPOLLONESHOT 注册到 epoll 上。 每个 http 请求的处理都是单线程的,处理完每次 http 事件后,根据 old_event 和 new_event,比对一下(当前最新版本是没有对比的,都是 EPOLL_CTL_MOD,关于事件的二次注册这块目前写的感觉有点乱),来确定 EPOLL_CTL_MOD EPOLL_CTL_ADD EPOLL_CTL_DEL 或者不操作。这样能减少系统调用 epoll_ctl
小根堆定时器那里,我觉得最好使用 epoll_wait + 小根堆来实现,用小根堆的最小时间 timeout 来唤醒 epoll_wait,唤醒后,堆顶结点肯定超时了,libevent 就是这么做的
The text was updated successfully, but these errors were encountered: