Properties and precondition checkers related to Android main thread.
This split provides several properties related to Android main Thread and 2 precondition checkers.
Here's the list:
mainLooper
: Shortcut toLooper.getMainLooper()!!
with caching.mainThread
: Shortcut toLooper.getMainLooper()!!.thread
with caching.isMainThread
: Boolean property that is true if the current Thread is the main Thread.checkMainThread()
: Throws anIllegalStateException
if not run on the main Thread.checkNotMainThread()
: Throws anIllegalStateException
if run on the main Thread.
implementation("com.louiscad.splitties:splitties-mainthread:$splitties_version")