Android
Coroutine Context
열정창작소
2023. 1. 4. 18:49
Coroutine Context
1. Dispatchers (코루틴 실행되는 스레드 지정)
- Default (CPU 연산작업)
- IO (파일 IO , 네트워크 IO)
- Main (UI Thread 에서 UI관련 변경)
- Unconfined
2. Job & Deferred (continue)
- States
-methods
(
cancel, //작업 coroutine 취소
join, // 작업 끝날때까지 대기
start //작업 coroutine 시작
)