Thread pool

ReZero lol

https://tech.meituan.com/2020/04/02/java-pooling-pratice-in-meituan.html

基本利益

统一管理IT资源,包括服务器、存储、和网络资源等等。通过共享资源,使用户在低投入中获益。

  1. 内存池(Memory Pooling):预先申请内存,提升申请内存速度,减少内存碎片。

  2. 连接池(Connection Pooling):预先申请数据库连接,提升申请连接的速度,降低系统的开销。

  3. 实例池(Object Pooling):循环使用对象,减少资源在初始化和释放时的昂贵损耗。

核心实现

总体设计

生命周期管理

任务调度

阻塞队列

拒绝策略

  • Post title:Thread pool
  • Post author:ReZero
  • Create time:2020-09-20 16:41:00
  • Post link:https://rezeros.github.io/2020/09/20/threadpool/
  • Copyright Notice:All articles in this blog are licensed under BY-NC-SA unless stating additionally.
 Comments