[cdi-dev] [JBoss JIRA] (CDI-698) Ordering of Async Events

Matej Novotny (JIRA) issues at jboss.org
Wed Mar 22 03:55:01 EDT 2017


    [ https://issues.jboss.org/browse/CDI-698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13382080#comment-13382080 ] 

Matej Novotny edited comment on CDI-698 at 3/22/17 3:54 AM:
------------------------------------------------------------

Hmm, my two cents:
* If you _feel_ you are blocked waiting for the result of async observer (e.g. want to make sure certain observer goes first), then it would, perhaps, be better to use a sync event/observer for that.
* Also, we allow to provide custom executors - I cannot really see how we make sure those exectutors take this into consideration.
* Last but not least I think this ruins the idea of async which is "fire and forget".


was (Author: manovotn):
Hmm, my two cents:
* If you *feel* you are blocked waiting for the result of async observer (e.g. want to make sure certain observer goes first), then it would, perhaps, be better to use a sync event/observer for that.
* Also, we allow to provide custom executors - I cannot really see how we make sure those exectutors take this into consideration.
* Last but not least I think this ruins the idea of async which is "fire and forget".

> Ordering of Async Events
> ------------------------
>
>                 Key: CDI-698
>                 URL: https://issues.jboss.org/browse/CDI-698
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>    Affects Versions: 2.0 .Final
>            Reporter: John Ament
>
> Async Events don't presently support ordering.  When the number of observers grows, and is larger than the number of available threads, I may wan to have events follow a certain order, to ensure my more important observers are seen first.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the cdi-dev mailing list