# ThreadPool **Repository Path**: xieLcai/thread-pool ## Basic Information - **Project Name**: ThreadPool - **Description**: 学习C++,完成的项目。 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-02-16 - **Last Updated**: 2023-10-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ThreadPool #### 介绍 学习C++,完成的项目。 #### 使用说明 1. 书写工作类继承Task类,重写run方法。 ``` class MyTask : public Task { public: MyTask(); Any run() { } private: }; ``` 2. 创建线程池对象,设置线程池类型(默认fixed类型)。 ``` ThreadPool pool; //用户自己设置线程池的工作模式 pool.setMode(PoolMode::MODE_CACHED); //开始启动线程池 pool.start(4); ``` 3. 可以接收线程的任何类型返回值 #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)