forUnboundFiber

fun forUnboundFiber(fiber: A_Fiber, action: () -> Unit): () -> Unit

Answer an AvailTask suitable for performing activities on behalf of an unbound ExecutionState.SUSPENDEDFiberDescriptor. If the continuation fails for any reason, then it transitions the fiber to the aborted state and invokes the fiber's failure continuation with the terminal throwable.

Return

An action that runs the provided continuation and handles any errors appropriately.

Parameters

fiber

A fiber.

action

What to do to on behalf of the unbound fiber.