For Thread, it is not only a unit of work (including the run method), but also an execution mechanism (start method ). Executor framework decouples the two to separate the work units and execution mechanisms. Executor is responsible for executing tasks. runnable and callable represent business logic units (the former has no return value, and the latter has a return value ). With the executor framework, we do not need to manually create a Thread because the executor framework has an interface dedicated to Thread creation-ThreadFactory, which declares only one method-newThread and returns one Thread. A simple implementation is: [java] class SimpleThreadFactory implements ThreadFactory {@ Override public Thread newThread (Runnable r) {return new Thread (r );}} if we use the executors tool class to create a specific executor, if the custom ThreadFactory is not explicitly told, the default thread factory is used: [java] static class DefaultThreadFactory implements ThreadFactory {private static final AtomicInteger poolNumber = new AtomicInteger (1); private final ThreadGroup group; private final OmicInteger threadNumber = new AtomicInteger (1); private final String namePrefix; DefaultThreadFactory () {SecurityManager s = System. getSecurityManager (); group = (s! = Null )? S. getThreadGroup (): Thread. currentThread (). getThreadGroup (); namePrefix = "pool-" + poolNumber. getAndIncrement () + "-thread-";} public Thread newThread (Runnable r) {Thread t = new Thread (group, r, namePrefix + threadNumber. getAndIncrement (), 0); if (t. isDaemon () t. setDaemon (false); if (t. getPriority ()! = Thread. NORM_PRIORITY) t. setPriority (Thread. NORM_PRIORITY); return t; www.2cto.com} if you want to customize the thread factory, you need to provide a class that implements ThreadFactory (SimpleThreadFactory above), and then when we create a specific executor: [java] ExecutorService executor = Executors. newCachedThreadPool (new SimpleThreadFactory (); ExecutorService executor = Executors. newSingleThreadExecutor (new SimpleThreadFactory (); ExecutorService executor = Executors. newFixedThread Pool (10, new SimpleThreadFactory (); ExecutorService executor = Executors. newScheduledThreadPool (10, new SimpleThreadFactory (); in this way, a custom thread factory is used to create a thread.