arrow-effects-data / arrow.effects

Package arrow.effects

Types

ConnectionCancellationException object ConnectionCancellationException : JavaCancellationException
ForIO class ForIO
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.
MVarPartialOf interface MVarPartialOf<F>
Builds a MVar value for data types F without deciding the type of the MVar’s value.
OnCancel enum class OnCancel
PartiallyAppliedRef interface PartiallyAppliedRef<F>
Intermediate interface to partially apply F to Ref.
Promise interface Promise<F, A>
When made, a Promise is empty. Until it is fulfilled, which can only happen once.
Ref interface Ref<F, A>
An asynchronous, concurrent mutable reference.
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>

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<Either<Tuple2<A, Fiber<ForIO, B>>, Tuple2<Fiber<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.