Git Product home page Git Product logo

tokio-io-pool's Introduction

tokio-io-pool

Crates.io

This crate provided a thread pool for executing short, I/O-heavy futures efficiently.

It is no longer necessary following the scheduler improvements in tokio 0.2.0-alpha.7, which handle concurrent I/O on many sockets much better than the old scheduler did. Tokio 0.2 also does not allow the same hooks to provide a custom scheduler, so even if it were necessary, updating tokio-io-pool to work as "transparently" as it did with tokio 0.1 would be difficult. For that reason, this project has been discontinued. If you find an issue with tokio's performance, file it as a tokio bug :)

tokio-io-pool's People

Contributors

asomers avatar jonhoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tokio-io-pool's Issues

No Timer/Reactor per thread: Uses CurrentThread Runtime with ParkThread Park impl

Currently it looks like tokio-io-pool uses the default Park of CurrentThread, which is ParkThread. That one is basically a condition variable and nothing else.

That means, from what I understand, that a global Reactor (and Timer) instance is created, and not one per thread.

AFAIU to have one reactor per runtime, something like the following would be needed

    let reactor = reactor::Reactor::new().unwrap();
    let handle = reactor.handle();
    let mut enter = ::tokio_executor::enter().unwrap();
    let timer = timer::Timer::new(reactor);
    let timer_handle = timer.handle();
    let mut current_thread = tokio_current_thread::CurrentThread::new_with_park(timer);

    ::tokio_reactor::with_default(&handle, &mut enter, |mut enter| {
        ::tokio_timer::with_default(&timer_handle, &mut enter, |enter| {
            current_thread.run();
        }
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.