Skip to content

Commit

Permalink
Deletet EPOLLEXCLUSIVE (#238 #226)
Browse files Browse the repository at this point in the history
防止修改fd事件时报错
  • Loading branch information
PioLing authored Jul 25, 2024
1 parent fdd3450 commit 054f2f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Poller/EventPoller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ int EventPoller::addEvent(int fd, int event, PollEventCB cb) {
if (isCurrentThread()) {
#if defined(HAS_EPOLL)
struct epoll_event ev = {0};
ev.events = (toEpoll(event)) | EPOLLEXCLUSIVE;
ev.events = toEpoll(event) ;
ev.data.fd = fd;
int ret = epoll_ctl(_event_fd, EPOLL_CTL_ADD, fd, &ev);
if (ret != -1) {
Expand Down

2 comments on commit 054f2f6

@GanQi
Copy link

@GanQi GanQi commented on 054f2f6 Nov 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to avoid accept thundering after deleting this flag?

删除这个标志后,如何避免accept惊群?

TRANS_BY_GITHUB_AI_ASSISTANT

@xia-chu
Copy link
Member

@xia-chu xia-chu commented on 054f2f6 Nov 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#226
There is an explanation here.

#226
这里有解释

TRANS_BY_GITHUB_AI_ASSISTANT

Please sign in to comment.