简单小巧的C语言线程池实现

 

C Thread Pool

This is a minimal but advanced threadpool implementation.

  • ANCI C and POSIX compliant
  • Pause/resume/wait as you like
  • Simple easy-to-digest API
  • Well tested

The threadpool is under MIT license. Notice that this project took a considerable amount of work and sacrifice of my free time and the reason I give it for free (even for commercial use) is so when you become rich and wealthy you don't forget about us open-source creatures of the night. Cheers!

 

 

这是一个简单小巧的C语言线程池实现,在 Github 上有 1.1K 的 star,很适合用来学习 Linux 的多线程编程。

另外,里面还涉及到了信号、队列、同步等知识点,代码读起来还是挺过瘾的。

特点:

  • 符合 ANCI C and POSIX;
  • 支持暂停/恢复/等待功能;
  • 简洁的 API;
  • 经过严格的测试,附带了丰富的测试用例;

 

https://github.com/Pithikos/C-Thread-Pool

 

https://mp.weixin.qq.com/s/hNreJxcKd5P0hwctucLBYw

 

 

https://github.com/sogou/workflow/blob/master/src/kernel/thrdpool.c

 

posted @ 2022-07-28 09:42  sinferwu  阅读(81)  评论(0编辑  收藏  举报