android-components / mozilla.components.support.ktx.kotlinx.coroutines

Package mozilla.components.support.ktx.kotlinx.coroutines

Functions

Name Summary
throttleLatest fun <T> throttleLatest(skipTimeInMs: Long = 300L, coroutineScope: CoroutineScope, block: (T) -> Unit): (T) -> Unit
Returns a function that limits the executions of the block function, until the skipTimeInMs passes, then the latest value passed to block will be used. Any calls before skipTimeInMs passes will be ignored. All calls to the returned function must happen on the same thread.