You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Harish Krishnaswamy <hk...@comcast.net> on 2004/02/09 19:27:35 UTC
[HiveMind] Bug in ThreadEventNotifierImpl?
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