你好,我是 Amit Shekhar,Outcome School 的联合创始人 • 2010-14 年就读于印度理工学院 • 我已经教导和指导过许多开发者,他们的努力使他们获得了高薪的技术工作,帮助许多科技公司解决了他们独特的问题,并创建了许多被顶级公司使用的开源库。我热衷于通过开源、博客和视频分享知识。
你可以在以下平台上与我联系:
coroutineScope
vs supervisorScope
:coroutinescope vs supervisorscope单个网络调用: 学习如何使用 Kotlin 协程进行网络调用。这是 Android 应用开发中一个非常简单的用例。 博客:Retrofit 与 Kotlin 协程
串行网络调用: 学习如何使用 Kotlin 协程进行串行网络调用。当您想要进行依赖于另一个网络调用的网络调用时,这很有用。
并行网络调用: 学习如何使用 Kotlin 协程进行并行网络调用。当您想要并行进行相互独立的网络调用时,这很有用。
Room 数据库操作: 学习如何使用 Kotlin 协程在数据库中获取或插入实体。当您在 Android 应用中使用 Room 数据库时,这很有用。
长时间运行任务: 学习如何使用 Kotlin 协程运行长时间运行的任务。如果您想在后台线程中使用 Kotlin 协程执行任何任务,这将很有用。
两个长时间运行任务: 学习如何使用 Kotlin 协程并行运行两个长时间运行的任务。
超时: 学习如何使用 Kotlin 协程为任务添加超时。如果您想为 Android 中的任何后台任务添加超时,这将非常有用。
Try-Catch 错误处理: 学习如何使用 Try-Catch 在 Kotlin 协程中处理错误。
CoroutineExceptionHandler: 学习如何使用 CoroutineExceptionHandler 在 Kotlin 协程中处理错误。
忽略错误并继续: 学习如何使用 supervisorScope
来忽略一个任务的错误并继续执行其他任务。换句话说,如果在一个监督器下有多个子作业并行运行,一个子作业失败,我们可以继续执行其他作业。
单元测试: 学习如何为使用 Kotlin 协程的 ViewModel 编写单元测试。
Copyright (C) 2024 Amit Shekhar
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
只需提交拉取请求。你就加入了!
谢谢
Amit Shekhar
Outcome School 联合创始人
你可以在以下平台上与我联系: