LoginSignup
0
0

More than 1 year has passed since last update.

【kotlin】CoroutineContextとは(自分用メモ)

Posted at

はじめに

今回は 前回に引き続きCoroutine内のCoroutineContextについて勉強したものを自分用のメモがわりに記事にしていきます

CoroutineContextとは

CoroutineContext とは、コルーチンの状態を表す値の集まりの事。
"Job"や "CoroutineDispatcher" などの要素を使い動作を行うことができます。

要素を以下にまとめました

CoroutineContext要素表

要素 内容
job コルーチンのライフサイクルを制御する
CoroutineDispatcher 適切なスレッドに処理を送信する
CoroutineName コルーチンの名前、デバッグに役立つ
CoroutineExceptionHandler キャッチされない例外を処理する

参考

図で理解する Kotlin Coroutine
Developers

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0