Basic Components#
The above figure shows that newCachedThreadPool is composed of 0 core threads + Integer.MAX_VALUE maximum threads + SynchronousQueue blocking queue (where each thread has a maximum survival time of 60s).
Execution Process#
For the SynchronousQueue blocking queue, since this blocking queue can only offer when taking an object, the red box part will return false and cannot enter. At this point, the green box part will be executed (a regular thread will be started and the corresponding command will be executed using the regular thread).