arrow-fx / arrow.fx / Promise / unsafeUncancellable
fun <F, A> unsafeUncancellable(AS:
Async
<F>):
Promise
<F, A>
Creates an empty Promise
from on Async instance for F.
Does not support cancellation of get operation.
This method is considered unsafe because it is not referentially transparent – it allocates mutable state.
import arrow.fx.*
import arrow.fx.extensions.io.async.async
fun main(args: Array<String>) {
//sampleStart
val unsafePromise: Promise<ForIO, Int> = Promise.unsafeUncancellable(IO.async())
//sampleEnd
}
Do you like Arrow?
✖