MainThreadWorker

interface MainThreadWorker

A task executor that works on the main thread.

See also

Functions

cancel
Link copied to clipboard
abstract fun cancel(runnable: Runnable)
Remove any pending posts of Runnable that are in the message queue.
post
Link copied to clipboard
abstract fun post(runnable: Runnable)
Posts passed runnable to the main thread.
postDelayed
Link copied to clipboard
abstract fun postDelayed(delay: Long, unit: TimeUnit = TimeUnit.MILLISECONDS, runnable: Runnable)
Posts passed runnable to the main thread to be run after the specified amount of time elapses.

Properties

isMainThread
Link copied to clipboard
abstract val isMainThread: Boolean
True if the current thread is the main thread, false otherwise.
mainExecutor
Link copied to clipboard
abstract val mainExecutor: Executor
Executor that will run enqueued tasks on the main thread.

Inheritors

SearchSdkMainThreadWorker
Link copied to clipboard