Scala futures creating infinity threads in actors
问题 I am using futures and timeouts inside an actor to avoid system to wait to long for a command to execute: val _output = future { "myCommand.sh" !! } output = try { Await.result(_output, 3 minutes) } catch { case e: TimeoutException => { LOG.warn(s"Timeout for command. Will return empty.") "" } } System.out.println("Number of active threads from the given thread: " + Thread.activeCount()); I run this code hundreds of times from different actors. I am noticing that the number of running threads