Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
Tags
- activity
- ViewModel
- BOJ
- 백준
- Navigation
- recyclerview
- 알림
- Behavior
- room
- HTTP
- Android
- 코틀린
- AppBarLayout
- notification
- onMeasure
- Coroutine
- sqlite
- onLayout
- kotlin
- Algorithm
- CoordinatorLayout
- DataBinding
- 알고리즘
- CustomView
- hilt
- lifecycle
- 안드로이드
- CollapsingToolbarLayout
- View
- LiveData
Archives
- Today
- Total
목록isActive (1)
개발일지
Kotlin in A..Z - Coroutine(3) Cancel
cancel() Job을 취소시키는 함수, Job이 취소되었을 때 suspend 함수를 호출하면 JobCancellationException을 발생시킨다. fun main() = runBlocking { val job = launch { repeat(5) { try { delay(1000L) println("Job Run Index($it)") } catch (e: Exception) { e.printStackTrace() } } } delay(3000L) job.cancel() job.join() } Job Run Index(0) Job Run Index(1) kotlinx.coroutines.JobCancellationException: StandaloneCoroutine was cancelled; ..
Kotlin (코틀린)
2020. 10. 15. 22:05