{"action":"closed","issue":{"url":"https://api.github.com/repos/ktoso/sbt-jmh/issues/43","labels_url":"https://api.github.com/repos/ktoso/sbt-jmh/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/ktoso/sbt-jmh/issues/43/comments","events_url":"https://api.github.com/repos/ktoso/sbt-jmh/issues/43/events","html_url":"https://github.com/ktoso/sbt-jmh/issues/43","id":79047115,"number":43,"title":"Launching Akka ActorSystem","user":{"login":"alexander-myltsev","id":574267,"avatar_url":"https://avatars.githubusercontent.com/u/574267?v=3","gravatar_id":"","url":"https://api.github.com/users/alexander-myltsev","html_url":"https://github.com/alexander-myltsev","followers_url":"https://api.github.com/users/alexander-myltsev/followers","following_url":"https://api.github.com/users/alexander-myltsev/following{/other_user}","gists_url":"https://api.github.com/users/alexander-myltsev/gists{/gist_id}","starred_url":"https://api.github.com/users/alexander-myltsev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexander-myltsev/subscriptions","organizations_url":"https://api.github.com/users/alexander-myltsev/orgs","repos_url":"https://api.github.com/users/alexander-myltsev/repos","events_url":"https://api.github.com/users/alexander-myltsev/events{/privacy}","received_events_url":"https://api.github.com/users/alexander-myltsev/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ktoso/sbt-jmh/labels/discussion","name":"discussion","color":"fef2c0"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-21T15:35:07Z","updated_at":"2015-05-22T18:01:46Z","closed_at":"2015-05-22T18:01:46Z","body":"Hi guys, \r\n\r\nI know that it is not the best place to ask about ActorSystem in JMH, but I believe the right people are here. \r\n\r\n```scala\r\n@BenchmarkMode(Array(Mode.AverageTime))\r\n@OutputTimeUnit(TimeUnit.MICROSECONDS)\r\n@State(Scope.Benchmark)\r\n@Warmup(iterations = 8)\r\n@Measurement(iterations = 4)\r\n@Threads(1)\r\n@Fork(1)\r\nclass HandlerBenchmark {\r\n  implicit val actorServiceAskTimeout = Timeout(5.seconds)\r\n\r\n  val config   = ConfigLoader.load\r\n  implicit val system = ActorSystem(\"HandlerBenchmarkActorSystem\", config)\r\n  runActors(config)\r\n\r\n  @TearDown\r\n  def teardown() = this.synchronized {\r\n    system.shutdown()\r\n  }\r\n}\r\n```\r\n\r\nBut `teardown` does not work as I see those messages:\r\n```\r\n[info] <JMH had finished, but forked VM did not exit, are there stray running threads? Waiting 24 seconds more...>\r\n[info] <JMH had finished, but forked VM did not exit, are there stray running threads? Waiting 19 seconds more...>\r\n[info] <JMH had finished, but forked VM did not exit, are there stray running threads? Waiting 14 seconds more...>\r\n```\r\n\r\nCould you recommend a best practice in what way you do it?"}}