How to wait for Akka actor system to terminate?

前端 未结 7 713
温柔的废话
温柔的废话 2020-12-25 14:19

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

7条回答
  •  北荒
    北荒 (楼主)
    2020-12-25 15:15

    I found the solution - just call system.shutdown from the master actor:

    context.system.shutdown
    

提交回复
热议问题