scala future and promise:
we can wrap up the future in future {} and create the Future[T] as the return value.
For chain actions, we can use map, or we can use for/yield (which can be translated into map actually)
The usage of recover, recoverWith, fallbackTo, andThen.
using blocking() for any blocking code instead of using the Awaitable trait.
val f = p.future
本文详细介绍了Scala中Future与Promise的基本用法及高级特性。包括如何使用future{}
1089

被折叠的 条评论
为什么被折叠?



