摘要: 为了凑字,把oracle文档里介绍ThreadLocal抄过来 This class provides thread-local variables. These variables differ from their normal counterparts in that each thread 阅读全文
posted @ 2016-10-02 18:51 woqiaoxun 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 这个示例是网上烂大街的,子线程循环100次,主线程循环50次,但是我试了很多次,而且从网上找了很多示例,其实多运行几次,看输出结果并不正确。不知道是我转牛角尖了,还是怎么了。也没有大神问,好痛苦。现在记录在这里,等以后有时间看。 阅读全文
posted @ 2016-10-02 17:27 woqiaoxun 阅读(149) 评论(0) 推荐(0) 编辑
摘要: (示例都是网上视频的) 假如两个线程同时调用一个方法输出字符串 输出: this is testokokokokokokthis is testokokokokokokthis is testokokothis is testkokokoktokokokokokokhis is testokokok 阅读全文
posted @ 2016-10-02 11:07 woqiaoxun 阅读(281) 评论(0) 推荐(0) 编辑