Package com.jnape.palatable.lambda.io
Class IO.Compose<A>
- java.lang.Object
-
- com.jnape.palatable.lambda.io.IO<A>
-
- com.jnape.palatable.lambda.io.IO.Compose<A>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<A>
unsafePerformAsyncIO(java.util.concurrent.Executor executor)
Returns aCompletableFuture
representing the result of this eventual effect.A
unsafePerformIO()
Run the effect represented by thisIO
instance, blocking the current thread until the effect terminates.-
Methods inherited from class com.jnape.palatable.lambda.io.IO
catchError, discardL, discardR, ensuring, exceptionally, externallyManaged, flatMap, fmap, fuse, interruptible, io, io, io, lazyZip, memoize, monitorSync, pin, pure, pureIO, safe, throwError, throwing, trampolineM, unsafePerformAsyncIO, zip
-
-
-
-
Method Detail
-
unsafePerformIO
public A unsafePerformIO()
Description copied from class:IO
Run the effect represented by thisIO
instance, blocking the current thread until the effect terminates.- Specified by:
unsafePerformIO
in classIO<A>
- Returns:
- the result of the effect
-
unsafePerformAsyncIO
public java.util.concurrent.CompletableFuture<A> unsafePerformAsyncIO(java.util.concurrent.Executor executor)
Description copied from class:IO
Returns aCompletableFuture
representing the result of this eventual effect. By default, this will immediately run the effect in terms of the providedExecutor
. Note that specificIO
constructions may allow this method to delegate to externally-managedCompletableFuture
instead of synthesizing their own.- Specified by:
unsafePerformAsyncIO
in classIO<A>
- Parameters:
executor
- theExecutor
to run theCompletableFuture
from- Returns:
- the
CompletableFuture
representing thisIO
's eventual result - See Also:
IO.unsafePerformAsyncIO()
-
-