This works as expected:
object Planexecutor extends App {
import scalaz.concurrent.Future
import scala.concurrent.duration._
val f = Future.apply(longComputation)
val result = f.run
println(result)
}
This does not:
object Planexecutor extends App {
import scalaz.concurrent.Future
import scala.concurrent.duration._
val f = Future.apply(longComputation).timed(1.second)
val result = f.run
println(result)
}
In the first case, the application exits normally whereas in the second case it does not. However, both versions properly print out the result value.
Is this a bug or is there something I am not understanding?