Coroutine doens't start?
问题 Based on this post throttleFirst function: fun <T> throttleFirst( skipMs: Long = 700L, scope: CoroutineScope = viewModelScope, action: (T) -> Unit ): (T) -> Unit { var throttleJob: Job? = null return { param: T -> if (throttleJob?.isCompleted != false) { throttleJob = coroutineScope.launch { destinationFunction(param) delay(skipMs) } } } } I'm using it like this: View <Button android:onClick="@{viewModel.myClickListener}" .../> ViewModel: fun myClickListener() = View.OnClickListener { _ ->