code format

https://github.com/alibaba/p3c/issues/107
This commit is contained in:
骏烈
2017-10-24 10:57:40 +08:00
parent 59fb91e069
commit 139fe4c846

View File

@@ -107,7 +107,7 @@ Positive example 3
.setNameFormat("demo-pool-%d").build(); .setNameFormat("demo-pool-%d").build();
ExecutorService singleThreadPool = new ThreadPoolExecutor(1, 1, ExecutorService singleThreadPool = new ThreadPoolExecutor(1, 1,
0L, TimeUnit.MILLISECONDS, 0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue<Runnable>(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy()); new LinkedBlockingQueue<Runnable>(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy());
singleThreadPool.execute(()-> System.out.println(Thread.currentThread().getName())); singleThreadPool.execute(()-> System.out.println(Thread.currentThread().getName()));
singleThreadPool.shutdown(); singleThreadPool.shutdown();