java.lang.Object
java.lang.ThreadLocal<T>
- Direct Known Subclasses:
- InheritableThreadLocal
- See Also:
- Top Examples, Source Code
public T get()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
protected T initialValue()
- See Also:
set(T)
, get()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void remove()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void set(Object value)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void set(T value)
- See Also:
initialValue()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public ThreadLocal()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[1671]Multithreading synchronization
By Anonymous on 2005/11/04 20:23:08 Rate
With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared resources. Without synchronization, it is possible for one thread to modify a shared variable while another thread is in the process of using or updating same shared variable. This usually leads to significant errors.
You can also use this ThreadLocal class to maintain some states which is local to a thread to avoid race condition.