-
Bug
-
Resolution: Incomplete
-
P4
-
None
-
8
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
The value in InheritableThreadLocal didn't get cleared if working with the ThreadPool getting via Executors.newCachedThreadPool()
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Please note it is a remittance issue, not reproducible every time.
1. create Threadpool via Executors.newCachedThreadPool()
2. init InheritableThreadLocal in a thread
3. call InheritableThreadLocal.remove() in finally block
3. read InheritableThreadLocal in another thread
4. the step #3 returned stale value assigned in step #2
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The InheritableThreadLocal should clear the value
ACTUAL -
The InheritableThreadLocal still holds the stale value
FREQUENCY : rarely
The value in InheritableThreadLocal didn't get cleared if working with the ThreadPool getting via Executors.newCachedThreadPool()
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Please note it is a remittance issue, not reproducible every time.
1. create Threadpool via Executors.newCachedThreadPool()
2. init InheritableThreadLocal in a thread
3. call InheritableThreadLocal.remove() in finally block
3. read InheritableThreadLocal in another thread
4. the step #3 returned stale value assigned in step #2
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The InheritableThreadLocal should clear the value
ACTUAL -
The InheritableThreadLocal still holds the stale value
FREQUENCY : rarely