dispatchOnNewBackgroundThread

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

On Android, it uses Executor service and on iOS, it uses background queue.

Parameters

T

the input of the job

V

the output of the job

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