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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to