loadAsync

fun <T> loadAsync(errorHandler: (Throwable) -> Unit = { throw it }, mapper: (ByteArray) -> T & Any, consumer: (T & Any) -> Unit)

load the given resource asynchronously, mapping to definitely non-nullable type T, calling the consumer with the result on the worker thread.

In case of failure, the errorHandler will be called with the exception.

Since

1.1.6

See also


fun loadAsync(errorHandler: (Throwable) -> Unit = { throw it }, consumer: (ByteArray) -> Unit)

load the given resource asynchronously into a new byte array, calling the consumer with the result on the worker thread.

In case of failure, the errorHandler will be called with the exception.

Since

1.1.6

See also