android-components / mozilla.components.support.utils / ThreadUtils

ThreadUtils

object ThreadUtils (source)

Functions

assertOnUiThread

fun assertOnUiThread(): Unit

postToBackgroundThread

fun postToBackgroundThread(runnable: Runnable): Unit
fun postToBackgroundThread(runnable: () -> Unit): Unit

postToMainThread

fun postToMainThread(runnable: Runnable): Unit

postToMainThreadDelayed

fun postToMainThreadDelayed(runnable: Runnable, delayMillis: Long): Unit

setHandlerForTest

fun setHandlerForTest(handler: Handler): Unit