I need to start Akka (2.0) actor system, send in some messages, then wait for it to do heavy lifting. After that, I need to do something unrelated to those actors.
I
How about:
import scala.concurrent.Await import scala.concurrent.duration._ Await.ready(system.terminate(), 5.seconds)
terminate returns a Future:
def terminate(): Future[Terminated]
and you can just await completion of this future.