queue

fun queue(failure: (Throwable) -> Unit = { throw it }, consumer: (T) -> Unit = {})

Invoke supplier asynchronously and consume consumer with the T value returned

Parameters

failure

Consumer to invoke when an exception is thrown by supplier

consumer

to be invoked with T after successful completion of supplier

Sources

common source
Link copied to clipboard