This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:0.16" | |
// compile "android.arch.lifecycle:runtime:1.0.0-alpha3" | |
// compile "android.arch.lifecycle:extensions:1.0.0-alpha3" | |
// kapt "android.arch.lifecycle:compiler:1.0.0-alpha3" | |
class AsyncLiveData<T> private constructor(private val exec: suspend () -> T) : LiveData<T>() { | |
private var observer: Observer<T>? = null | |
private var job: Job? = null |