Job Dispatcher
Dispatches a given job on a particular thread.
Examples
val future = JobDispatcher.dispatchOnMainThread("Hello") {it: String ->
assertEquals("Hello", it) // runs on main thread
}
future.await()
val future = JobDispatcher.dispatchOnBackgroundThread("Hello") {it: String ->
assertEquals("Hello", it) // runs on background thread
}
future.await()
object JobDispatcher
Content copied to clipboard
Functions
dispatchOnCurrentThread
Link copied to clipboard
dispatchOnMainThread
Link copied to clipboard
dispatchOnNewBackgroundThread
Link copied to clipboard
dispatchOnWorker
Link copied to clipboard
equals
Link copied to clipboard