[cdi-dev] What, if any, guarantees are made about invoking asynchronous event observer methods?
manovotn at redhat.com
Wed May 24 05:13:41 EDT 2017
managed to figure out your TestScenario3 with FJP in single thread.
I feel silly for not noticing earlier, but the only real problem is that your test GH project used Weld 3.0.0.CR2 and the actual parallel option was added in 3.0.0.Final.
So, just upgrade your POM to 3.0.0.Final and it will magically work :)
----- Original Message -----
> From: "Laird Nelson" <ljnelson at gmail.com>
> To: "Matej Novotny" <manovotn at redhat.com>
> Cc: "cdi-dev" <cdi-dev at lists.jboss.org>
> Sent: Monday, May 15, 2017 5:25:10 PM
> Subject: Re: [cdi-dev] What, if any, guarantees are made about invoking asynchronous event observer methods?
> On Mon, May 15, 2017 at 12:13 AM Matej Novotny <manovotn at redhat.com> wrote:
> > TestScenario1/2 are pretty much what we are discussing here - the
> > container terminates and observers don't get notified any more.
> > Obviously, if you hang any additional 'thenRun' etc. on top of that, it
> > won't work either.
> > TestScenario3 is with Weld parallel mode and is IMO out of scope of
> > previous discussion but important nonetheless.
> Yeah—this git repo was less a reproducer and more just me playing around.
> > This is indeed weird and I think you are observing a peculiar behaviour of
> > default executor in SE, which is ForkJoinPool.
> > We have a test for parallel execution in SE, where we defined your own
> > executor (see 'createWeld' method) and it works like a charm.
> > I think we need to look into FJP to see what's truly going on there.
> Oh, that is interesting. OK; thanks.
More information about the cdi-dev