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

Reactor refactor #2279

Merged
merged 3 commits into from Oct 6, 2020
Merged

Reactor refactor #2279

merged 3 commits into from Oct 6, 2020

Commits on Oct 1, 2020

  1. Refactor Reactor and Client request buffering

    Refactor Reactor into a more generic IO-with-timeout monitor,
    using a Queue to simplify the implementation.
    Move request-buffering logic into Server#reactor_wakeup.
    Fixes bug in managing timeouts on clients.
    Move, update and rewrite documentation to match updated class structure.
    wjordan committed Oct 1, 2020
    Copy the full SHA
    de2f108 View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2020

  1. Fix a few concurrency bugs

    - In `Reactor#shutdown`, `@selector` can be closed before the call to `#wakeup`, so catch/ignore the `IOError` that may be thrown.
    - `Reactor#wakeup!` can delete elements from the `@timeouts` array so calling it from an `#each` block can cause the array iteration to miss elements. Call @block directly instead.
    - Change `Reactor#add` to return `false` if the reactor is already shut down instead of invoking the block immediately, so a client-request currently being processed can continue, rather than re-adding to the thread-pool (which may already be shutting down and unable to accept new work).
    wjordan committed Oct 3, 2020
    Copy the full SHA
    490d0ea View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2020

  1. Copy the full SHA
    c08b63f View commit details
    Browse the repository at this point in the history