dispatchOnMainThread

Dispatches a non-capturing lambda job with jobInput as its input on the main thread. The jobInput is converted to an immutable object and then passed to the job as argument.

Parameters

T

the input of the job

V

the output of the job

fun <T, V> dispatchOnMainThread(jobInput: T, job: (T) -> V): Future<V>