728x90

Android Studio에서 corotine을 쓸때

 

 

Update

In the recent releases of Kotlin Coroutines, I notice if a method doesn't contain any coroutines code(like launch, async, etc), the compiler complains This inspection reports a suspend modifier as redundant if no other suspend functions are called inside. So I assume that suspend should be only used when it's a must.

Update2

An advice from Google

 

Reference

stackoverflow.com/questions/54554753/when-to-use-kotlin-suspend-keyword

728x90

'Dev > Kotlin' 카테고리의 다른 글

[Kotlin/Coroutine] CoroutineScope 종류  (0) 2020.11.19
[Kotlin] Built-in Delegates  (0) 2020.11.19
[Kotlin 기초] Boolean Array 일괄 초기화 방법  (0) 2020.10.26
[Kotlin] 증감 연산 함수  (0) 2020.09.22
[Kotlin] @JvmField, @JvmStatic  (0) 2020.08.20

+ Recent posts