实现异步编程
Future类似于ES6里面的Promise
3秒后打印出done
通过whenComplete来获取future执行结束后的结果。
执行时间设置为3秒。超时时间设置为2秒。
6-3 异步:Future与FutureBuilder实用技巧
原文:https://www.cnblogs.com/wangjunwei/p/12196063.html