线程池类结构图
2020-10-30 10:28:49 6 举报
线程池类图解析(点赞是创作的动力,谢谢)
作者其他创作
大纲/内容
AbstractExcutorService
DiscardPolicy
ThreadFactory
+newThread(Runnable r):Thread
DiscardOldestPolicy
ThreadPoolExcutor
- workers:HashSet<Worker> -corePoolSize:int-maximumPoolSize:int-workQueue:BlockingQueue<Runnable> -keepAliveTime:long-threadFactory:ThreadFactory-handler:RejectedExecutionHandler
<<interface>>Excutor
AbortPolicy
worker
thread:ThreadfirstTask:Runnable
Runnable
+ run():void
CallerRunsPolicy
<<interface>>ExcutorService
Excutors
+ newCachedThreadPool()():ExecutorService+newFixedThreadPool(int nThreads):ExecutorService+newSingleThreadExecutor():ExecutorService...
DefaultThreadFactory
<<interface>>RejectedExecutionHandler
AQS
收藏
0 条评论
下一页