Skip to content

这里有可能没有唤醒,如果epoll_wait也没有唤醒,那么... #2

Open

Description

@spobit

void EventLoop::queueInLoop(Task& task)
{
{
MutexLockGuard guard(_mutex);
_pendingFunctors.push_back(task);
}

if(!isInLoopThread() || _callingPendingFunctors)
{
    wakeup();
}

}

Activity

  1. spobit commented on Nov 8, 2018

    @spobit
    Author

    希望给点指导,谢谢老哥

  2. none-happy commented on Sep 5, 2020

    @none-happy

    希望给点指导,谢谢老哥

    感觉这里确实有问题
    int fds = ::epoll_wait(_epollfd, _events, MAX_EVENTS, -1);
    timeout=-1,此时epoll_wait是由外部触发的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions