Creates a simple, noncancelable F[A]
instance that
executes an asynchronous process on evaluation.
Creates a simple, noncancelable F[A]
instance that
executes an asynchronous process on evaluation.
The given function is being injected with a side-effectful callback for signaling the final result of an asynchronous process.
is a function that should be called with a callback for signaling the result once it is ready
Evaluates F[_]
, with the effect of starting the run-loop
being suspended in the IO
context.
Evaluates F[_]
, with the effect of starting the run-loop
being suspended in the IO
context.
Note that evaluating the returned IO[Unit]
is guaranteed
to execute immediately:
val io = F.runAsync(fa)(cb) // For triggering actual execution, guaranteed to be // immediate because it doesn't wait for the result io.unsafeRunSync
Suspends the evaluation of an F
reference.
Suspends the evaluation of an F
reference.
Equivalent to FlatMap.flatten
for pure expressions,
the purpose of this function is to suspend side effects
in F
.
Lifts any by-name parameter into the F
context.
Lifts any by-name parameter into the F
context.
Equivalent to Applicative.pure
for pure expressions,
the purpose of this function is to suspend side effects
in F
.
Inherited from LiftIO, defines a conversion from IO
in terms of the Async
type class.
Inherited from LiftIO, defines a conversion from IO
in terms of the Async
type class.
N.B. expressing this conversion in terms of Async
and its
capabilities means that the resulting F
is not cancelable.
Concurrent then overrides this with an implementation
that is.
To access this implementation as a standalone function, you can use Async.liftIO (on the object companion).
(Since version 1.0.0-RC2) Use *> or productR instead.
(Since version 1.0.0-RC2) Use productREval instead.
(Since version 1.0.0-RC2) Use <* or productL instead.
(Since version 1.0.0-RC2) Use productLEval instead.
A monad that can suspend side effects into the
F
context and that supports lazy and potentially asynchronous evaluation.This type class is describing data types that:
Note this is the safe and generic version of IO.unsafeRunAsync (aka Haskell's
unsafePerformIO
).