Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

ThreadLocal & InheritableThreadLocal in Java, initialValue() v/s set(), Uses of childValue()

ThreadLocal in Java - what is it used for?As the name suggests this Java library class is used for supporting thread-local variables - the variables which are local to the particular thread instance and hence each thread will have their own copy of such variables which will be initialized every time a new thread is spawned.To be more clear, let's take one simple example. If you have a class



This post first appeared on Geek Explains: Java, J2EE, Oracle, Puzzles, And Problem Solving!, please read the originial post: here

Share the post

ThreadLocal & InheritableThreadLocal in Java, initialValue() v/s set(), Uses of childValue()

×

Subscribe to Geek Explains: Java, J2ee, Oracle, Puzzles, And Problem Solving!

Get updates delivered right to your inbox!

Thank you for your subscription

×