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

Remove futures_cpupool in favor of tokio #7

Closed
wants to merge 3 commits into from

Commits on Sep 30, 2018

  1. Remove futures_cpupool in favor of tokio

    Previously, a dedicated cpupool was spun up to run hashing and
    verification in a non-blocking fashion. This is unfortunate given that
    there is usually already a threadpool running: the Tokio threadpool.
    This patch changes the code to run non-blocking hashing and verification
    on the tokio threadpool instead, to avoid configuring and creating a
    separate one. It uses tokio_threadpool::blocking to ensure that it does
    not hold up other Futures while doing so.
    
    Note that this removes the ability to configure the number of threads
    used to perform non-blocking compute, and instead places that
    responsibility on whomever sets up the `tokio::Runtime`. This is
    *probably* better, but does change the API. Furthermore, the
    `non_blocking` methods now _only_ work under `tokio` (actix uses tokio
    btw), and will not work in non-tokio asynchronous deployments (although
    those should be rare).
    jonhoo committed Sep 30, 2018
    Configuration menu
    Copy the full SHA
    ba0370a View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2018

  1. Don't pull in tokio

    We got rid of tokio::spawn, so we now only need tokio-threadpool!
    jonhoo committed Oct 3, 2018
    Configuration menu
    Copy the full SHA
    61b447c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ff8236b View commit details
    Browse the repository at this point in the history