commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Essl <christiane...@yahoo.de>
Subject Re: [HiveMind] EventListenerList
Date Mon, 06 Oct 2003 23:48:47 GMT
The Multicaster is realy intresting code.Howard however now made the 
EventListenerList also thread save. However I still miss that a removal of 
a Listener is regarded. Just imagine a Poolable which (as it should) 
deregisters and than is hit by an event after it was passivated (or even 
released).

What's about wrapping the EventListener in a Removed object. When one is 
removed it is removed from the base Array and the Removed object is marked 
as removed. Then don't use a normal Iterator but one which returns null if 
nothing is left. This 'Iterator' than checks if the Removed wrapper is 
marked as such and skips it and at the end of the array returns null.




---------------------------------------------------------------------
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