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

AsyncEnvWrapper

class AsyncEnvWrapper<R> : AsyncSupport<R>, Logging

Keeps async status as atomic reference.

Constructors

<init>

Keeps async status as atomic reference.

AsyncEnvWrapper(state: AtomicReference<AsyncStack<R>> = AtomicReference(CleanAsyncStack()))

Functions

asyncStack

fun asyncStack(): AsyncStack<R>

setAsyncStack

fun setAsyncStack(oldState: AsyncStack<R>, newState: AsyncStack<R>): Unit

Extension Functions

logger

Use it to log using slf4j.

fun <T : Logging> T.logger(): Logger