* Adding support for maven assembly plugin to generate executable jar with all dependencies in built * Merge branch 'master' into issue-989 # Conflicts: # abstract-document/pom.xml # pom.xml * Adding maven assemly plugin for projects with name A * Update in format as per checkstyle, i.e. Spcae in place of tab with size of 2 * batch set - 2 having all project with B and C * issue-989 d-e-f * fixing eip pom and adding g-h-i-l-m-n Skipping naked object as it seems it doesn't have main method, will consider this at end * Adding for O and P projects Skipping Object-Mother as we don't have main method for same. * Final batch
layout, title, folder, permalink, categories, tags
layout | title | folder | permalink | categories | tags | |
---|---|---|---|---|---|---|
pattern | Thread Local Storage | tls | /patterns/tls/ | Idiom |
|
Intent
Securing variables global to a thread against being spoiled by other threads. That is needed if you use class variables or static variables in your Callable object or Runnable object that are not read-only.
Class diagram
Applicability
Use the Thread Local Storage in any of the following situations
- When you use class variables in your Callable / Runnable object that are not read-only and you use the same Callable instance in more than one thread running in parallel.
- When you use static variables in your Callable / Runnable object that are not read-only and more than one instances of the Callable / Runnable may run in parallel threads.