flutter - 阻止进程等待未来完成
问题描述
String longMehtod() async{
await longProcess()
return ok;
}
Future<String> a = longMehtod()
//add some code to block the process to wait Future complete and I can get the value of a
我可以阻止该过程并确保必须在不使用等待/异步的情况下打印该值吗?
或者在Rxjava中有没有像blockingget这样的方法?
解决方案
推荐阅读
- package - 如何在最后一次通过 buildroot 构建 rootfs 时构建我自己的包?
- ios - iOS WatchOS5 - 如何为手表应用程序支持多个复杂功能系列?
- grails - log.info 写在哪里?
- classification - 如何打印混淆矩阵的标签和列名?
- clang - llvm 编译器何时拆分基本块
- java - Java - 用于保留的分布式 JPA 锁
- android - 当“不保持活动”打开时,通过活动重新创建来维护对象,例如在无头片段中
- informatica - Informatica 工作流场景
- python - 遍历具有不同元素的列表
- python - 代码是什么意思?self.plusOne(digits[:-1]) digits.extend([0])