Hi Roland.
Thanks for your answer.
Sure, the problem was that I was not aware about that threads. I'm afraid
that I have to shutdown such threads at system shutdown because the library
shares threads among several actor instances. Anyway, problem solved!
Thanks again for your time very helpful
Hi Eduardo,
threads created by other libraries are not managed by Akka, you will have to
shut down that external DB interface yourself. The best place to do this would
be in the actor’s postStop() hook (I mean that actor which also creates and
uses that DB).
Regards,
Roland
> 14 mar 2016
Hum... it's look like an actor which uses an asynchronous DB persistor from
an external library sometimes launches a thread. When the thread is running
the shutdown() does nothing and the awaitTermination() doesn't block. If I
stop the thread (I have to say that in a not very documented way)
Me too :(
I'l prepare a minimum example. Typically when I do this the problem get
clear and I could fix my test code :)
Regards.
On Fri, Mar 11, 2016 at 1:43 PM, Patrik Nordwall
wrote:
> Please share minimized code of the problem. We use this all over the place
>
Please share minimized code of the problem. We use this all over the place
so I'm pretty sure your code is not correct.
On Fri, Mar 11, 2016 at 1:39 PM, Eduardo Fernandes wrote:
> Hi. Thanks Patrik.
>
> I am using shutdown() and then awaitTermination(). Both don't block and
>
Hi. Thanks Patrik.
I am using shutdown() and then awaitTermination(). Both don't block and
return immediately. My previous test start two nodes and the the
awaitTermination()
blocks as expected and everything works fine. The only test which fails is
the one which works in single-node mode.
I've
You must use shutdown followed by awaitTermination.
(note that awaitTermination is replaced by something else in 2.4.x, see
deprecation)
In TestKit there is a helper method to shutdown the actor system, await and
verify.
On Fri, Mar 11, 2016 at 1:22 PM, Eduardo Fernandes
Hi.
Hum... I think that is not the case. In fact the methods shutdown()
and awaitTermination()
simply don't block at all and the next test says that the port 12551 is
already bound. If my previous test starts two nodes everything works find
and the awaitTermination() method waits for the node
Hi Eduardo,
If you have an actor that is blocking indefinitely, the actor system
termination will never complete, could this be the case? If it is you
should be able to see that by getting a thread dump from the JVM and see
one of your actor blocking one of the dispatcher threads.
--
Johan
Hi group! Thanks for your time in advance.
I'm using Java version 2.3.13. In my JUnit tests and when I'm testing in
single node the awaitTermination function after the traditional shutdown()
is not awaiting for the actor system termination. In fact the actorsystem
is not event starting to
10 matches
Mail list logo