![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java
iteye_13176
这个作者很懒,什么都没留下…
展开
-
深入浅出ThreadLocal
一、ThreadLocal概述 学习JDK中的类,首先看下JDK API对此类的描述,描述如下: JDK API 写道 该类提供了线程局部 (thread-local) 变量。这些变量不同于它们的普通对应物,因为访问某个变量(通过其 get 或 set 方法)的每个线程都有自己的局部变量,它独立于变量的初始化副本。ThreadLocal 实例通常是类中的 private sta...2010-09-07 14:16:33 · 120 阅读 · 0 评论 -
ThreadLocal示例
本文借花献佛,引用Tim Cull的博文“SimpleDateFormat: Performance Pig”介绍下ThreadLocal的简单使用,同时也对SimpleDateFormat的使用有个深入的了解。 Tim Cull 写道 Just yesterday I came across this problem “in the wild” for the third time ...2010-09-07 16:27:07 · 96 阅读 · 0 评论