queue

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

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