美文网首页
Concurrency & Thread Pool

Concurrency & Thread Pool

作者: michael_0x | 来源:发表于2019-04-07 14:45 被阅读0次

No Thread Pool, high cost to create new threads

image.png

Thread Pool to reuse threads already created

image.png

Consideration:

image.png

Thread Pools Java offered:

image.png

CachedThreadPool:

image.png

ScheduledThreadPool

image.png

constructor

image.png image.png image.png

remark: 0 seconds means not applicable

Queue types for different pools

image.png

task reject policy

image.png image.png image.png

Life Cycle

image.png

Callable & Future

image.png image.png image.png

相关文章

网友评论

      本文标题:Concurrency & Thread Pool

      本文链接:https://www.haomeiwen.com/subject/lprsiqtx.html