thrdpool 0.1.0

Creates a threadpool to run multiple jobs in parallel
Documentation
  • Coverage
  • 0%
    0 out of 4 items documented0 out of 3 items with examples
  • Size
  • Source code size: 2.37 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.19 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • matteac

ThreadPool

A simple package to run multiple jobs in a threadpool

    // you can handle 4 connections !!!!!!
    let pool = ThreadPool::new(4);
    for stream in listener.incoming() {
        let stream = stream.unwrap();
        pool.execute(|| {
            handle_connection(stream);
            println!("Connection handled!");
        })
    }