Skip to content

fuyao-w/rust_thread_pool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

rust_thread_pool

  • 用法
        let pool = ThreadPoolBuilder::new().
            with_pool_name("haha".to_string()).
            with_core_pool_size(4).
            build();
        for i in 0..100 {
            pool.execute(move || {
                println!("execute job {}", i);
            });
        }
        // pool.update_core_pool_size(0);
        // assert_eq!(pool.data.has_worker(), true);
        pool.join();

About

rust 线程池

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages