ThreadLocal

GPTKB entity

Statements (30)
Predicate Object
gptkbp:instanceOf gptkb:class
gptkbp:API generic class
gptkbp:author gptkb:Sun_Microsystems
gptkbp:category concurrency utility
gptkbp:defaultIn nan
gptkbp:definedIn gptkb:java.lang_package
gptkbp:documentation https://docs.oracle.com/javase/8/docs/api/java/lang/ThreadLocal.html
gptkbp:feature can help avoid synchronization
each thread has its own value
values are not shared between threads
https://www.w3.org/2000/01/rdf-schema#label ThreadLocal
gptkbp:introducedIn gptkb:JDK_1.2
gptkbp:limitation can cause memory leaks if not removed
not suitable for all concurrency problems
gptkbp:method remove()
get()
set()
initialValue()
gptkbp:purpose provides thread-local variables
gptkbp:relatedTo gptkb:InheritableThreadLocal
gptkb:ThreadLocalRandom
Thread
gptkbp:subclassOf gptkb:InheritableThreadLocal
gptkbp:threadSafe yes
gptkbp:typeParameter T
gptkbp:usedFor storing data per thread
gptkbp:usedIn multi-threaded programming
gptkbp:bfsParent gptkb:Scoped_Values_(incubator)
gptkb:java.lang_package
gptkbp:bfsLayer 6