arrow-fx-coroutines / arrow.fx.coroutines / Environment / unsafeRunAsync

unsafeRunAsync

open fun unsafeRunAsync(fa: suspend () -> Unit): Unit

Execution strategy that will immediately return and perform the program’s work without blocking the current thread. This operation runs uncancellable.

Allows you to run suspend programs that return Unit. When an exception occurs, it will be rethrown.

abstract fun <A> unsafeRunAsync(fa: suspend () -> A, e: (Throwable) -> Unit, a: (A) -> Unit): Unit

Execution strategy that will immediately return and perform the program’s work without blocking the current thread. This operation runs uncancellable.

Allows you to run suspend programs that return A. The result will be passed to a in case of success, or to e in case of an exception.

Do you like Arrow?

Arrow Org
<