我想要做這樣的事情。 def foo(s : String): Future[Boolean] = Future {
val a = someLongRunningMethod
if(!a)
return false or throw some exception // what should i return
//do some more thing
我有以下方法,在斯卡拉應用播放返回字符串列表: def example = Action.async { request =>
val access = getAccess()
if (access > 0) {
val future = MyObject.intensiveMethod
future.map {
result =