Coroutine Context

CoroutineContext 앞서 우리는 다음의 내용들을 배웠다. Dispatcher: 코루틴이 실행될 스레드 풀을 잡고 있는 관리자 CoroutineExceptionHandler: 코루틴에서 Exception이 생겼을 때의 처리기 그런데 이 두 가지 요소는 CoroutineContext가 들어가야 할 자리에 그대로 들어갈 수 있다. 에서는 Dispatcher가 CoroutineContext 자리에 들어간다. 에서는 CoroutineExceptionHandler가 CoroutineContext자리에 들어간다. 이것이 가능한 이유는 각각이 CoroutineContext를 확장하는 인터페이스의 구현체이기 때문이다. *CoroutineDispatcher의 내부 살펴보기 더보기 public abstract c..
Dev.Cho
'Coroutine Context' 태그의 글 목록