当我点击ctrl-C取消我正在运行的akka quickstart应用程序时,我得到了以下错误。这是正常的还是有一个akka配置可以避免这种情况?
有人能解释一下为什么会发生这种情况吗?
sbt:akka-quickstart-scala> exit
[info] shutting down sbt server
[warn] Run canceled.
Exception in thread "sbt-bg-threads-1" java.util.concurrent.RejectedExecutionException
at java.util.concurrent.ForkJoinPool.externalSubmit(ForkJoinPool.java:2328)
at java.util.concurrent.ForkJoinPool.externalPush(ForkJoinPool.java:2419)
at java.util.concurrent.ForkJoinPool.execute(ForkJoinPool.java:2648)
at scala.concurrent.impl.ExecutionContextImpl.execute(ExecutionContextImpl.scala:24)
at sbt.internal.BackgroundThreadPool$BackgroundRunnable.$anonfun$cleanup$1(DefaultBackgroundJobService.scala:390)
at sbt.internal.BackgroundThreadPool$BackgroundRunnable.$anonfun$cleanup$1$adapted(DefaultBackgroundJobService.scala:389)
at scala.collection.immutable.List.foreach(List.scala:392)
at sbt.internal.BackgroundThreadPool$BackgroundRunnable.cleanup(DefaultBackgroundJobService.scala:389)
at sbt.internal.BackgroundThreadPool$BackgroundRunnable.run(DefaultBackgroundJobService.scala:359)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
1条答案
按热度按时间ffvjumwh1#
这是一个已知问题,可在此github issue link中看到。
在我的例子中,当我把我的sbt升级到1.3.3时,同样的问题出现了,当我用
sbt run
启动时,我的akka代码没有被CTRL+C
关闭。它只记录了一个警告消息,并没有停止。所以,我不得不把sbt版本从1.3.3
降级到1.2.8
来使它工作。如果有帮助的话,请让我知道!