Tim Ellison wrote:
Thomas Hawtin wrote:
Some modern code,
such as I believe Spring, creates many ThreadLocal instances, so you may
wish to look further at quality of implementation issues.
Ack -- thanks. What do you call "many"? 100's? 1,000s? more?
Good question. Googling tends to just pick up ThreadLocals assigned to
static finals, which aren't so much of an issue. However, a private
e-mail from someone well known for threading work contains: "There are
web/EE applications that generate massive numbers (up to millions) of
ThreadLocals (most are per-instance, not statics), some of which quickly
become garbage and must be reclaimed reasonably promptly...".
Tom Hawtin