I was on an airport when I answered hence my very short answer, I meant that you use it just like the following example: https://github.com/real-logic/Aeron/blob/master/aeron-samples/src/main/java/io/aeron/samples/LowLatencyMediaDriver.java
Basically your main method last call is a blocking call to wait for a SIGTERM, I'm guessing that the main thread will be on a WAIT_FOR_CONDITION so it will simply go off and be IDLE until a SIGTERM is received. I guess that because Artery uses Aeron why not then use their provided SIGTERM logic. HTH, Guido. On Monday, November 28, 2016 at 5:26:16 PM UTC, Guido Medina wrote: > > Last method call in main thread, no other thread needed as it will block > until SigTerm is received. > > On 28 Nov 2016 4:40 p.m., "Marek Żebrowski" <marek.zebrow...@gmail.com> > wrote: > >> Guido, how exactly do you use registerShutdownHook(ActorSystem system) ? >> Is it last call in application main() >> I tried to write something similar - I created a thread >> val shutdownThread = new Thread(new Runnable() { >> override def run() = { >> new SigIntBarrier().await() >> application.shutdown() >> } >> }) >> shutdownThread.setName("shutdown-thread") >> shutdownThread.setDaemon(true) >> shutdownThread.start() >> but that code is never reached, shutdownHook is fired earlier - I kill >> process with kill signal. >> >> -- >> >>>>>>>>>> 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 a topic in the >> Google Groups "Akka User List" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/akka-user/JuJhI6apb00/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> akka-user+unsubscr...@googlegroups.com. >> To post to this group, send email to akka-user@googlegroups.com. >> Visit this group at https://groups.google.com/group/akka-user. >> For more options, visit https://groups.google.com/d/optout. >> > -- >>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.