Hi George, Akka threads are by default not daemonic, which means that a started ActorSystem will keep the JVM alive until you shutdown the ActorSystem. You don't need to awaitTermination in a separate thread.
/Patrik On Fri, Feb 13, 2015 at 3:05 AM, George Lu <[email protected]> wrote: > Dear all, > > I have a background thread pool which read messages from a queue and > invokes Akka system in a single node (actually several nodes which reads > from the single queue, but each node will have Akka of its own, no > distributed execution environment). > Ideally, my background thread only read message and invoke Akka on the > single node, after that, the background will back to thread pool. > > I am afraid that after the background thread return to thread pool, will > the akka system be garbage collected? > As in my current code, I use AwaitTermination in the background thread > after I send the message to mater. > > Do I need to invoke AwaitTermination, if I don't invoke this, is it for > sure that akka will finish all the task if no exception are thrown? > > Thanks! > > Regards, > George > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ > >>>>>>>>>> Check the FAQ: > http://doc.akka.io/docs/akka/current/additional/faq.html > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > --- > You received this message because you are subscribed to the Google Groups > "Akka User List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Patrik Nordwall Typesafe <http://typesafe.com/> - Reactive apps on the JVM Twitter: @patriknw [image: Scala Days] <http://event.scaladays.org/scaladays-sanfran-2015> -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
