안드로이드 Kotlin Coroutines 정리 Part 1
2019. 4. 2.
Coroutin GlobalScope GlobalScope.launch { // launch new coroutine in background and continue delay(1000L) // non-blocking delay for 1 second (default time unit is ms) Log.e("coroutine","World!") // print after delay } Log.e("coroutine","Hello,") Thread.sleep(2000L) // block main thread for 2 seconds to keep JVM alive Hello, World! 본질적으로 코루틴은 light-weight threads 입니다. 코루틴은 CoroutineScope의 context..