avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@d-haven.org>
Subject Re: [RT] Notification pattern has interesting effects on IoC
Date Thu, 26 Feb 2004 15:40:05 GMT
Leo Sutic wrote:

> 
>>Not sure. In very 'busy' systems, it becomes a challange to 
>>write the 'hub', so that you don't need to synchronize the 
>>'addListener' and 'fireEvent' parts, because otherwise it 
>>becomes a bottleneck.
> 
> 
> Listeners are added and removed comparatively rarely compared
> to the number of fireEvent calls, so a copy-on-write list
> can eliminate much synchronization.

The GUIApp EventBus is very simple, and it separates out the
need for synchronous and asynchronous events.  If you need
synchronous events we use the SwingUtils class to ensure all
those events are fired in one thread.  The asynchronous events
can happen in any order.

It's not hard.


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


Mime
View raw message