arrow-fx / arrow.fx / Promise / uncancellable

uncancellable

fun <F, A> uncancellable(AS: Async<F>): Kind<F, Promise<F, A>>

Creates an empty Promise from on Async instance for F. Does not support cancellation of get operation.

import arrow.fx.*
import arrow.fx.extensions.io.async.async

fun main(args: Array<String>) {
  //sampleStart
  val promise: IOOf<Promise<ForIO, Int>> = Promise.uncancellable(IO.async())
  //sampleEnd
}

Do you like Arrow?

Arrow Org
<