??????? worker
???????beforeExecute(wt?? task)??????ThreadPoolExecutor????????????????
?????????????????worker?????????????????????????????????????Ρ?
???????afterExecute(task?? thrown);
???????? worker
??????????????????? null????? worker
??????????? getTask
????????????????????????????????У??????????????????
????private final BlockingQueue<Runnable> workQueue;
????getTask()??????????л??????????????????????????????????·???null????worker????
???????е?????????????????????
???????????STOP??
???????????SHUTDOWN??????????????
????????????????????????????????????????
?????????????????timed???????????????????????????????????????????1???????????
????timed = allowCoreThreadTimeOut || wc > corePoolSize;
????Runnable r = timed ?
????workQueue.poll(keepAliveTime?? TimeUnit.NANOSECONDS) :
????workQueue.take();
??????????????????μ??????????
???????????????????????allowCoreThreadTimeOut(true)
??????????????????????wc > corePoolSize
??????????????????BlockingQueue??????????????????д????????????
???????
????ThreadPoolExecutor??????????-?????????????????????????????????????????????????????
????Executors???????????ThreadPoolExecutor??????????????????????????????????????ThreadPoolExecutor????дbeforeExecute??afterExecute????????????????????й????
????????н???л??????????????????????????????????е??С?????????????????ú??????
?????????????????CallerRunsPolicy???ò????????????????????????????????????????????????????С?