isOnMainThread

open fun isOnMainThread(): Boolean

Returns true if called on the main thread, false otherwise.