ThreadLocal

GPTKB entity

Statements (30)
Predicate Object
gptkbp:instanceOf gptkb:class
gptkbp:API gptkb: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
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:Thread
gptkb:InheritableThreadLocal
gptkb:ThreadLocalRandom
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:JEP_446:_Scoped_Values_(Preview)
gptkbp:bfsLayer 7
https://www.w3.org/2000/01/rdf-schema#label ThreadLocal