=================
== The Archive ==
=================

[Kotlin Coroutines] 13장. 코루틴 스코프 만들기

CoroutineScope 팩토리 함수

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
public interface CoroutineScope {
    /**
     * The context of this scope.
     * Context is encapsulated by the scope and used for implementation of coroutine builders that are extensions on the scope.
     * Accessing this property in general code is not recommended for any purposes except accessing the [Job] instance for advanced usages.
     *
     * By convention, should contain an instance of a [job][Job] to enforce structured concurrency.
     */
    public val coroutineContext: CoroutineContext
}

안드로이드에서 스코프 만들기

viewModelScope 와 lifecycleScope

백엔드에서 코루틴 만들기

추가적인 호출을 위한 스코프 만들기

요약