07 2016 档案
CountDownLatch
摘要:CountDownLatch 1、类介绍 一个同步辅助类,在完成一组正在其他线程中执行的操作之前,它允许一个或多个线程一直等待。用给定的计数 初始化 CountDownLatch。由于调用了 countDown() 方法,所以在当前计数到达零之前,await 方法会一直受阻塞。之后,会释放所有等待的 阅读全文
posted @ 2016-07-31 22:32 sheldon.xie 阅读(280) 评论(0) 推荐(1)
验证hashmap非线程安全
摘要:http://www.blogjava.net/lukangping/articles/331089.html 阅读全文
posted @ 2016-07-31 17:12 sheldon.xie 阅读(990) 评论(0) 推荐(0)
java SimpleDateFormat非线程安全测试
摘要:public class MyThread extends Thread { private SimpleDateFormat sdf; private String dateString; public MyThread(SimpleDateFormat sdf ,String dateString){ super(); this.sdf = sdf; this.dateString = d... 阅读全文
posted @ 2016-07-31 09:50 sheldon.xie 阅读(196) 评论(0) 推荐(0)