资源简介

这些java的代码demo,是本人几篇多线程文章的实例代码 http://www.cnblogs.com/yaoxiaowen/p/6576779.html

资源截图

代码片段和文件信息

package thread_runnable;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class CachedThreadPool{

public static void main(String[] args) {
ExecutorService exec = Executors.newCachedThreadPool();


System.out.println(“main start  “  + Thread.currentThread().getName());
for (int i=0; i<3; i++){
exec.execute(new CountDown());
}

exec.shutdown();
System.out.println(“main end  “  + Thread.currentThread().getName());
}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-03-19 18:24  ConcurrentDemo\
     文件       10244  2017-03-19 18:24  ConcurrentDemo\.DS_Store
     目录           0  2017-03-19 18:27  __MACOSX\
     目录           0  2017-03-19 18:27  __MACOSX\ConcurrentDemo\
     文件         120  2017-03-19 18:24  __MACOSX\ConcurrentDemo\._.DS_Store
     目录           0  2017-03-05 16:26  ConcurrentDemo\java\
     文件         226  2017-03-05 16:25  ConcurrentDemo\java\.classpath
     文件        6148  2017-03-05 16:26  ConcurrentDemo\java\.DS_Store
     目录           0  2017-03-19 18:27  __MACOSX\ConcurrentDemo\java\
     文件         120  2017-03-05 16:26  __MACOSX\ConcurrentDemo\java\._.DS_Store
     文件         956  2017-01-16 20:18  ConcurrentDemo\java\.gitignore
     文件         370  2017-03-05 16:25  ConcurrentDemo\java\.project
     目录           0  2017-03-19 09:28  ConcurrentDemo\java\bin\
     目录           0  2017-03-19 09:28  ConcurrentDemo\java\bin\thread_runnable\
     文件        1442  2017-03-19 09:28  ConcurrentDemo\java\bin\thread_runnable\Buffed.class
     文件        1311  2017-03-19 09:28  ConcurrentDemo\java\bin\thread_runnable\CachedThreadPool.class
     文件        1689  2017-03-19 09:28  ConcurrentDemo\java\bin\thread_runnable\CallableDemo.class
     文件         825  2017-03-19 09:28  ConcurrentDemo\java\bin\thread_runnable\Car.class
     文件         788  2017-03-19 09:28  ConcurrentDemo\java\bin\thread_runnable\Chopstick.class
     文件        1767  2017-03-19 09:28  ConcurrentDemo\java\bin\thread_runnable\CountDown.class
     文件        1227  2017-03-19 09:28  ConcurrentDemo\java\bin\thread_runnable\CustomTask.class
     文件        1267  2017-03-19 09:28  ConcurrentDemo\java\bin\thread_runnable\CustomThreadPool.class
     文件        1272  2017-03-19 09:28  ConcurrentDemo\java\bin\thread_runnable\DeadLockingDiningPhiosophers.class
     文件        1443  2017-03-19 09:28  ConcurrentDemo\java\bin\thread_runnable\DirectThread.class
     文件        1851  2017-03-19 09:28  ConcurrentDemo\java\bin\thread_runnable\EvenChecker.class
     文件         538  2017-03-19 09:28  ConcurrentDemo\java\bin\thread_runnable\EvenTest.class
     文件        1340  2017-03-19 09:28  ConcurrentDemo\java\bin\thread_runnable\FixedThreadPool.class
     文件         642  2017-03-19 09:28  ConcurrentDemo\java\bin\thread_runnable\IntGenerator.class
     文件        2199  2017-03-19 09:28  ConcurrentDemo\java\bin\thread_runnable\Philosopher.class
     文件        1562  2017-03-19 09:28  ConcurrentDemo\java\bin\thread_runnable\ScheduledExecutorServiceDemo.class
     文件        1616  2017-03-19 09:28  ConcurrentDemo\java\bin\thread_runnable\ScheduledFixedServiceDemo.class
............此处省略23个文件信息

评论

共有 条评论