Lucas Galfaso  wrote
> Hi All,
>   I am trying to figure out how EventAdmin actually works. Is it
> possible for an EventAdmin implementation to call an
> EventHandler::handleEvent while this handler is processing another
> event by another thread? Is this different if the event is synchronous
> or asynchronous? And if the event that is waiting to be processed was
> triggered by the same EventHandler?
> 
Hi,

afaik this is not explicitly stated in the spec, but I think an
EventHandler should expect to be called in parallel. For example, this
can happen if two threads send an event with the same topic in parallel.
So an event handler implementation should be thread safe.

As soon as you make any assumptions like "this only happens with async
events" or whatever, you're tying yourself to some characteristics of a
specific implementation of the event admin. Therefore just asume that i
can happen and you're safe

Carsten
-- 
Carsten Ziegeler
[email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to