Re: [akka-user] awaitTermination not working?

2016-03-14 Thread Eduardo Fernandes
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

Re: [akka-user] awaitTermination not working?

2016-03-14 Thread Roland Kuhn
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

Re: [akka-user] awaitTermination not working?

2016-03-13 Thread Eduardo Fernandes
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)

Re: [akka-user] awaitTermination not working?

2016-03-11 Thread Eduardo Fernandes
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 >

Re: [akka-user] awaitTermination not working?

2016-03-11 Thread Patrik Nordwall
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 >

Re: [akka-user] awaitTermination not working?

2016-03-11 Thread Eduardo Fernandes
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

Re: [akka-user] awaitTermination not working?

2016-03-11 Thread Patrik Nordwall
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

Re: [akka-user] awaitTermination not working?

2016-03-11 Thread 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

Re: [akka-user] awaitTermination not working?

2016-03-11 Thread Akka Team
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