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

ThreadUtils

object ThreadUtils (source)

Functions

Name Summary
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: <ERROR CLASS>): Unit

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.