본문 바로가기 메뉴 바로가기

taetae98

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

taetae98

검색하기 폼
  • 분류 전체보기 (58)
    • Android (31)
      • Widget (4)
      • Lifecycle (4)
      • Coroutine (9)
      • RxJava (8)
      • Gradle (4)
    • Flutter (6)
      • Dart (6)
    • CS (17)
      • Clean Code (17)
    • Git (4)
  • 방명록

NonCancellable (1)
Android Coroutine - Cancel

cancen() & cancelAndJoin() Coroutine에서 취소가 어떻게 진행되는지 확인해봅니다. // cancel과 cancelAndJoin의 차이 public suspend fun Job.cancelAndJoin() { cancel() return join() } cancel()을 실행했을 때 취소되지 않고 Coroutine이 계속 실행됩니다. 즉 Coroutine 내부에서 진행될 때 취소를 확인하여 종료할 수 있도록 설계 해야합니다. (개발자가 직접 취소 지점을 정할 수 있습니다.) val job = CoroutineScope(Dispatchers.IO).launch { for (i in 0 until 5) { Log.d("PASS", "Running") Thread.sleep(1000L..

Android/Coroutine 2022. 1. 8. 01:10
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • Kotlin
  • Widget
  • 코루틴
  • gradle
  • observable
  • rxjava
  • Android
  • Coroutine
  • 보이스카우트 규칙
  • TDD
  • Exception
  • DSL
  • clean code
  • 클린코드
  • ViewModelStoreOwner
  • isActive
  • 함수
  • CancellationException
  • ConcatAdapter.Config
  • ConcatAdapter
  • git
  • null
  • DART
  • Flowable
  • viewmodel
  • ViewModelProvider
  • 연산자
  • Flutter
  • 클린 코드
  • commit
more
«   2026/02   »
일 월 화 수 목 금 토
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
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바