There's a sample on the end of the Handling Futures section, showing how to make mainasync.
That sample starts by calling checkVersion(), which returns a Future, as declared before, but there's no await there.
So for a beginner, the expected behavior isn't obvious.... will it await, because there's an await inside checkVersion()? Or will it just ignore it all, executing a function that returns a Future, and discards that Future?
I think there should be another paragraph explaining what would happen on that particular case.
There's a sample on the end of the Handling Futures section, showing how to make
main
async
.That sample starts by calling
checkVersion()
, which returns aFuture
, as declared before, but there's noawait
there.So for a beginner, the expected behavior isn't obvious.... will it
await
, because there's anawait
insidecheckVersion()
? Or will it just ignore it all, executing a function that returns aFuture
, and discards thatFuture
?I think there should be another paragraph explaining what would happen on that particular case.