commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harish Krishnaswamy <hkrishnasw...@comcast.net>
Subject [HiveMind] Bug in ThreadEventNotifierImpl?
Date Mon, 09 Feb 2004 18:27:35 GMT
Howard,

Seems like ThreadEventNotifierImpl has a bug. ThreadLocalStorage is 
notified only once in the very first thread that creates and registers 
it with the notifier. All subsequent threads have no knowledge of the 
registered ThreadLocalStorage. Looking at the docs for ThreadLocal, it 
looks like ThreadLocal variables are initialized to null at the 
beginning of each thread and hence our listener registrations are lost. 
I changed the _storage variable in the ThreadEventNotifierImpl to be an 
EventListenerList instead of ThreadLocal and everything seems to be 
working fine. When EventListenerList is thread safe why did you choose 
ThreadLocal, am I missing something?

-Harish
PS. Sending this to your account directly just so you don't miss it.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message