We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please provide your feedback by posting a comment against this issue.
The text was updated successfully, but these errors were encountered:
Line 145: This meant App1ControlActor can successfully does not have to wait for JVM to exit.
This meant
can successfully does not have to wait for JVM to exit.
Missing shut down and between successfully and does not
shut down and
Sorry, something went wrong.
@jotomo thanks. I have incorporated the feedback.
Hi, you could have used sys.addShutdownHook from scala.sys package object which is a nice scala wrapper over java Runtime.getRuntime.addShutdownHook.
sys.addShutdownHook
scala.sys
Runtime.getRuntime.addShutdownHook
So basically instead of this:
Runtime.getRuntime.addShutdownHook(new Thread(new Runnable { override def run(): Unit = { val terminate: Future[Terminated] = system.terminate() Await.result(terminate, Duration("10 seconds")) } }))
you can do this:
sys.addShutdownHook { val terminate: Future[Terminated] = system.terminate() Await.result(terminate, Duration("10 seconds")) }
which looks nicer (less boilderplate) ;).
No branches or pull requests
Please provide your feedback by posting a comment against this issue.
The text was updated successfully, but these errors were encountered: