arrow-effects-data / arrow.effects

Package arrow.effects

Types

ConnectionCancellationException object ConnectionCancellationException : JavaCancellationException
ForIO class ForIO
ForResource class ForResource
IO sealed class IO<out A> : IOOf<A>
KindConnection sealed class KindConnection<F>
Connection for kinded type F.
MVar interface MVar<F, A>
It’s a mutable variable with context F, that is either empty or contains a value of type A. A pure concurrent queue of size 1.
MVarFactory interface MVarFactory<F>
Builds a MVar value for data types F without deciding the type of the MVar’s value.
OnCancel enum class OnCancel
Promise interface Promise<F, A>
When made, a Promise is empty. Until it is fulfilled, which can only happen once.
Race3 sealed class Race3<A, B, C>
Race4 sealed class Race4<A, B, C, D>
Race5 sealed class Race5<A, B, C, D, E>
Race6 sealed class Race6<A, B, C, D, E, F>
Race7 sealed class Race7<A, B, C, D, E, F, G>
Race8 sealed class Race8<A, B, C, D, E, F, G, H>
Race9 sealed class Race9<A, B, C, D, E, F, G, H, I>
RacePair sealed class RacePair<F, A, B>
Alias for Either structure to provide consistent signature for race methods.
RaceTriple sealed class RaceTriple<F, A, B, C>
Ref interface Ref<F, A>
An asynchronous, concurrent mutable reference.
RefFactory interface RefFactory<F>
Creates Ref for a kind F using a supplied function.
Resource interface Resource<F, E, A> : ResourceOf<F, E, A>
Semaphore interface Semaphore<F>
A counting Semaphore is used to control access to a resource in a concurrent system. It keeps track of the count of available resources.

Type Aliases

CancelToken typealias CancelToken<F> = Kind<F, Unit>
IOConnection typealias IOConnection = KindConnection<ForIO>
IOOf typealias IOOf<A> = Kind<ForIO, A>
IOProc typealias IOProc<A> = (IOConnection, (Either<Throwable, A>) -> Unit) -> Unit
IOProcF typealias IOProcF<A> = (IOConnection, (Either<Throwable, A>) -> Unit) -> IOOf<Unit>
Race2 typealias Race2<A, B> = Either<A, B>
Alias for Either structure to provide consistent signature for race methods.
ResourceKindedJ typealias ResourceKindedJ<F, E, A> = HkJ3<ForResource, F, E, A>
ResourceOf typealias ResourceOf<F, E, A> = Kind3<ForResource, F, E, A>
ResourcePartialOf typealias ResourcePartialOf<F, E> = Kind2<ForResource, F, E>

Extensions for External Classes

arrow.Kind  
kotlin.Function1  

Functions

IOConnection fun IOConnection(dummy: Unit = Unit): IOConnection
liftIO fun <A> A.liftIO(): IO<A>
toDisposable fun IOConnection.toDisposable(): Disposable

Companion Object Functions

racePair fun <A, B> IO.Companion.racePair(ctx: CoroutineContext, ioA: IOOf<A>, ioB: IOOf<B>): IO<RacePair<ForIO, A, B>>
Race two tasks concurrently within a new IO. Race results in a winner and the other, yet to finish task running in a Fiber.
raceTriple fun <A, B, C> IO.Companion.raceTriple(ctx: CoroutineContext, ioA: IOOf<A>, ioB: IOOf<B>, ioC: IOOf<C>): IO<RaceTriple<ForIO, A, B, C>>
Race three tasks concurrently within a new IO. Race results in a winner and the others, yet to finish task running in a Fiber.

Type Class Hierarchy