runFunctions

fun runFunctions(functions: Iterator<A_Function>, purpose: String, afterFailingOne: (A_Function, Throwable, proceed: () -> Unit) -> Unit, afterRunningAll: () -> Unit)

Run the specified tuple of functions sequentially.

Parameters

functions

An Iterator providing the A_Functions to run, sequentially, in separate fibers.

purpose

A very short string identifying the purpose of running these functions. It will appear in the name of the launched fibers.

afterFailingOne

What to do if a fiber launched to run one of the functions reports a failure. A "proceed" function is supplied, so the client can continue with the remaining functions, if that's appropriate, or report an error and simply not invoke that function.

afterRunningAll

What to do after every provided function has completed.