nee-core / dev.neeffect.nee.effects.async / AsyncStack

AsyncStack

sealed class AsyncStack<R>

Registry of async cleaning operations.

Properties

actions

val actions: Seq<AsyncClosingAction<R>>

Functions

doOnCleanUp

fun doOnCleanUp(action: AsyncClosingAction<R>): DirtyAsyncStack<R>

enterAsync

open fun enterAsync(): ActiveAsynStack<R>

performActions

fun performActions(env: R): R

Extension Functions

onClose

fun <R> AsyncStack<R>.onClose(f: (R) -> R): DirtyAsyncStack<R>

Inheritors

ActiveAsynStack

Ongoing async process.

class ActiveAsynStack<R> : AsyncStack<R>

CleanAsyncStack

Empty registry.

class CleanAsyncStack<R> : AsyncStack<R>

DirtyAsyncStack

Something is registered.

class DirtyAsyncStack<R> : AsyncStack<R>