Skip to content
New issue

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

implement lazy selector registration #388

Merged
merged 1 commit into from
May 4, 2018

Commits on May 4, 2018

  1. implement lazy selector registration

    Motivation:
    
    Previously we would eagerly register any fd with the selector
    (epoll/kqueue) which works well with kqueue. With epoll however, you'll
    get `EPOLLHUP` immediately if you supplied a socket that hasn't had
    connect/bind called on it.
    We got away with this because we took quite a bit of care to always make
    sure we call connect/bind pretty much immediately after we registered
    it.  And crucially before we ever asked the selector to tell us about
    new events.
    
    Modifications:
    
    made selector registration lazy (when we try activating the channel by
    calling connect/bind)
    
    Result:
    
    the user can now register and connect whenever they feel like it.
    weissi committed May 4, 2018
    Configuration menu
    Copy the full SHA
    1ec5999 View commit details
    Browse the repository at this point in the history