Kotlin源码系列-Dispatchers源码笔记

前言

  • launch源码中了解了,startCoroutineCancellable->createCoroutineUnintercepted->调用SuspendLambda内部类中的create方法
  • 协程创建之后,如何和线程产生关联?

Dispatchers

createCoroutineUnintercepted中的intercepted方法

  • Dispatchers.Default,Dispatchers.IO,Dispatchers.Unconfined,4
  • CoroutineDispatcher,3
  • ContinuationInterceptor,2
  • CoroutineContext,1
Author: golike
Link: http://jianhui1012.github.io/2024/09/09/Kotlin源码系列-Dispatchers源码笔记/
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.