协程

Catalogue   

协程Coroutine可以理解成轻量的线程,运行在线程中的非阻塞的Task;协程不会与特定的线程绑定,它可以在不同的线程之间灵活切换。

相关API:

  • CoroutineContext

  • CancellationException

  • Continuation

  • Job

  • Deferred

  • CoroutineScope.async

  • CoroutineScope.launch

  • Channel

  • Flow

  • suspendCoroutineUninterceptedOrReturn

  • suspendCoroutine

  • suspendCancellableCoroutine