Class IO.Compose<A>

    • Field Detail

      • source

        private final IO<?> source
      • composition

        private final Choice2<IO<?>,​Fn1<java.lang.Object,​IO<?>>> composition
    • Constructor Detail

      • Compose

        private Compose​(IO<?> source,
                        Choice2<IO<?>,​Fn1<java.lang.Object,​IO<?>>> composition)
    • Method Detail

      • unsafePerformIO

        public A unsafePerformIO()
        Description copied from class: IO
        Run the effect represented by this IO instance, blocking the current thread until the effect terminates.
        Specified by:
        unsafePerformIO in class IO<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 a CompletableFuture representing the result of this eventual effect. By default, this will immediately run the effect in terms of the provided Executor. Note that specific IO constructions may allow this method to delegate to externally-managed CompletableFuture instead of synthesizing their own.
        Specified by:
        unsafePerformAsyncIO in class IO<A>
        Parameters:
        executor - the Executor to run the CompletableFuture from
        Returns:
        the CompletableFuture representing this IO's eventual result
        See Also:
        IO.unsafePerformAsyncIO()