Comments (1)
我忘记suspendCoroutine是会返回到哪个线程中了,如果是会返回到外层协程所属的线程,那么应该没什么问题,因为外面的协程也是运行在IO线程当中的。但是这里无论如何enqueue一下是个比较好的习惯,因为你不需要依赖于外层线程是什么情况,总是可以保证程序是正确的。不然的话一旦外层线程是主线程,那么你在主线程里执行网络请求就要报错了。
from coolweatherjetpack.
Related Issues (20)
- 请求天气数据出错 HOT 1
- kotlin不用扩展库是不是有点尴尬
- 求指导,InjectorUtil类和WeatherModelFactory类有什么作用? HOT 2
- com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $ HOT 2
- 可以提供一个java版的mvvp吗 HOT 1
- 请问大佬有没有研究过协程的合并请求和类似rxjava的onErrorResumeNext
- 是否少提交了databinding目录中的资源 HOT 1
- 好像UI层没法获取到接口失败事件吧,展示错误View的场景怎么办呢? HOT 1
- 点击事件问题 HOT 1
- 关于by lazy的一点疑惑
- 关于ViewModel中持有Context做UI操作
- 下拉刷新一次温度天气就变了 HOT 1
- 问下 ChooseAreaBindingImpl 这个类是怎么生成的,是在build目录里的,我不太明白是怎么生成的,还是继承于ChooseAreaBinding的,多谢 HOT 3
- 貌似有bug HOT 2
- viewmodel中处理了ui操作? HOT 2
- 勘误,文字拼写错误 HOT 2
- 城市天气接口不可用 HOT 2
- Jetpack
- SSL peer shut down incorrectly HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coolweatherjetpack.