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 |
Tags
- CollapsingToolbarLayout
- AppBarLayout
- CoordinatorLayout
- sqlite
- Navigation
- onLayout
- Coroutine
- 알림
- CustomView
- onMeasure
- Android
- 백준
- LiveData
- lifecycle
- notification
- room
- Behavior
- Algorithm
- hilt
- kotlin
- HTTP
- View
- recyclerview
- activity
- 알고리즘
- ViewModel
- BOJ
- 코틀린
- DataBinding
- 안드로이드
Archives
- Today
- Total
목록withTimeoutOrNull (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