I am a newbie to scala futures and I have a doubt regarding the return value of scala futures.
So, generally syntax for a scala future is
def downloadPage(url: URL) = Future[List[Int]] {
}
I want to know how to access the List[Int]
from some other method which calls this method.
In other words,
val result = downloadPage("localhost")
then what should be the approach to get List[Int]
out of the future ?
I have tried using map method but not able to do this successfully.`
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…