Main Thread¶
Properties and precondition checkers related to Android main thread.
Content¶
This split provides several properties related to Android main Thread and 2 precondition checkers.
Here’s the list:
- mainLooper: Shortcut to- Looper.getMainLooper()!!with caching.
- mainThread: Shortcut to- Looper.getMainLooper()!!.threadwith caching.
- isMainThread: Boolean property that is true if the current Thread is the main Thread.
- checkMainThread(): Throws an- IllegalStateExceptionif not run on the main Thread.
- checkNotMainThread(): Throws an- IllegalStateExceptionif run on the main Thread.
Download¶
implementation "com.louiscad.splitties:splitties-mainthread:2.1.1"