I am working with InheritableThreadLocal
and I know that when creating the children the ThreadLocal
will have the default value the same as the parent thread value. But how can I maintain this when the parent's ThreadLocal
value is modified?
Is there a way that when the parent's ThreadLocal
is modified, all his children threads receive that modification?
EDIT: I have a boolean set on false in my parent thread. But I have a condition and when that happens I set the boolean to true and I need to do this also for all the children threads that were spawned by my initial thread.