Computer Hippocampus
  • 홈
  • 태그
  • 방명록
  • 메뉴 닫기
  • 글작성
  • 방명록
  • 환경설정
    • 분류 전체보기 (176)
      • Daily Records (0)
      • Coding Test 관련(with Kotlin) (0)
      • Android Dev (87)
        • NowInAndroid (7)
        • NaimanProject (0)
        • Compose (21)
        • Navigation (4)
        • Google Billing API (4)
        • Test Firebase Chatting App (12)
        • Login API 정리 (0)
        • Error logs (0)
      • 코틀린(Kotlin, Java) (14)
      • Swift (12)
        • codingTest (0)
      • Spring Boot (1)
      • Scala (3)
      • Js (0)
      • Programming Theory (13)
        • Functional Programming (2)
        • Design Pattern (0)
        • Generics (3)
        • 비동기 패러다임(Asynchronous Para.. (0)
        • 코루틴(Coruotine) (8)
        • Rxjava (0)
      • 파이어베이스(Firebase) (0)
      • 프로그래밍 팁 (1)
      • SystemVerilog (2)
      • Adobe (4)
        • 포토 일러스트레이터 (4)
        • Premiere pro (0)
      • Github 팁 (3)
      • RiscV (2)
        • Wake (1)
      • Linux (2)
      • CSS (4)
      • 회사 관련 (0)
  • 홈
  • 태그
  • 방명록
Programming Theory/코루틴(Coruotine)

Coroutines guide - android coroutine API

1. snapshotFlow 1. snapshotFlow fun snapshotFlow(block: () -> T): Flow Create a Flow from observable Snapshot state. (e.g. state holders returned by mutableStateOf.) snapshotFlow creates a Flow that runs block when collected and emits the result, recording any snapshot state that was accessed. While collection continues, if a new Snapshot is applied that changes state accessed by block, the flow..

2022. 10. 30. 15:23
Programming Theory/코루틴(Coruotine)

Coroutines/Flow/Suspend fun Design Trial

Trial List 예제0 : Flow basic 예제1 : Flow basic2 예제2 : SharedFlow basic 예제3 : Coroutine basic 예제4 : Coroutine Flow 예제5 : Coroutine flow for Testing(updated at 2022-11-24) 예제6 : Suspend function안에 async methods를 parallelly operating (updated at 2022-12-5) 예제7 : Custom Deferred Method using CompletableDeferred at Suspend function (updated at 2022-12-6) 예제0 : Flow basic MockServer에 n개의 RequestValue를 요..

2022. 2. 4. 00:49
Programming Theory/코루틴(Coruotine)

Coroutines guide, kotlinx-coroutines-core / flow

https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/ kotlinx-coroutines-core Core primitives to work with coroutines. Coroutine builder functions: Coroutine dispatchers implementing CoroutineDispatcher: More context elements: Synchronization primitives for coroutines: Top-level suspending functions: NameDescriptiondelayNon-blocking kotlin.github.io SharedFlow shareIn onSubscripti..

2022. 2. 1. 02:30
Programming Theory/코루틴(Coruotine)

Coroutines guide + Flow 정리(2022)

0> Coroutines guide Coroutines guide | Kotlin kotlinlang.org 1> kotlin은 async, await 가 standard library에 없고, suspending function 또한 future, promises에 비해 관리가 복잡하다. 2> kotlinx.coroutines library에 다양한 구현이 있으니 이를 사용하자 1> Coroutines basics 1. 코루틴은 어느 한 스레드에 종속되지않고 이리저리 옮겨다니면서 실행되는 computation suspend 기능을 갖춘 인스턴스다 2. 런치는 코루틴을 생성한다. 코드 블록내에서 런치 블록은 독립적으로 동작한다 3. 런블록킹은 코루틴블록이 아닌 공간에 코루틴이 동작하는 가교역할을 하는 코..

2022. 1. 22. 00:57
Programming Theory/코루틴(Coruotine)

kotlin Coroutine 정리(4, Coroutine Context and Dispatchers)

Coroutine Context and Dispatchers. 코루틴은 항상 어떠한 context 내에서 실행이 되는데, 이러한 context는 CoroutineContext type의 값에 의해 표현(represented)된다(이러한 타입은 kotlin standard library에 정의 되어 있음). Coroutine context는 다양한 요소(elements)의 집합이다. 주요한 요소는 coroutine의 Job이고(이전 장에 잠시 다룬 것이다), Job의 dispatcher이다. dispatcher은 이번 포스팅에서 자세히 다룬다. 먼저, 이번 페이지에서 살펴볼 목차는 아래와 같다(kotlinlang.org/docs/reference/coroutines/coroutine-context-and-..

2020. 9. 22. 09:23
Programming Theory/코루틴(Coruotine)

kotlin Coroutine 정리(3, Composing Suspending Functions)

Composing Suspending Functions 이번 페이지는 suspending functions의 구성을 알아본다. Sequential by default 기본에 기반한 연속성. 1> 위 함수는 1초정도의 지연이 있는 어떤 유용한 기능을 하는 함수를 가상적으로 만들어낸 것이다. 2> 만약에 두 함수를 순차적으로 invoke하게 되었을때 코루틴은 1번째 함수를 invoke하고 그 작업이 완료 된 후 2번쨰 함수를 invoke하여 총 2초 이상의 시간이 소요될 것이다. 3> 이는 coroutine 특성상 기본적인 옵션이 sequential하기 때문이고 아래 코드로 시간을 측정하여 그 결과를 확인할 수 있다. -*-*--*-*--*-*--*-*--*-*--*-*--*-*- 기억할 키워드 measur..

2020. 9. 21. 14:00
  • «
  • 1
  • 2
  • »

공지사항

전체 카테고리

  • 분류 전체보기 (176)
    • Daily Records (0)
    • Coding Test 관련(with Kotlin) (0)
    • Android Dev (87)
      • NowInAndroid (7)
      • NaimanProject (0)
      • Compose (21)
      • Navigation (4)
      • Google Billing API (4)
      • Test Firebase Chatting App (12)
      • Login API 정리 (0)
      • Error logs (0)
    • 코틀린(Kotlin, Java) (14)
    • Swift (12)
      • codingTest (0)
    • Spring Boot (1)
    • Scala (3)
    • Js (0)
    • Programming Theory (13)
      • Functional Programming (2)
      • Design Pattern (0)
      • Generics (3)
      • 비동기 패러다임(Asynchronous Para.. (0)
      • 코루틴(Coruotine) (8)
      • Rxjava (0)
    • 파이어베이스(Firebase) (0)
    • 프로그래밍 팁 (1)
    • SystemVerilog (2)
    • Adobe (4)
      • 포토 일러스트레이터 (4)
      • Premiere pro (0)
    • Github 팁 (3)
    • RiscV (2)
      • Wake (1)
    • Linux (2)
    • CSS (4)
    • 회사 관련 (0)
애드센스 광고 영역
  • 최근 글
  • 최근 댓글

최근 글

최근댓글

태그

MORE

전체 방문자

오늘
어제
전체

블로그 인기글

Powered by Privatenote Copyright © Computer Hippocampus All rights reserved. TistoryWhaleSkin3.4

티스토리툴바