final class SyncEffect[A] extends IO[Nothing, A]
- Alphabetic
- By Inheritance
- SyncEffect
- IO
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
*>[E1 >: Nothing, B](io: ⇒ IO[E1, B]): IO[E1, B]
A variant of
flatMapthat ignores the value produced by this action.A variant of
flatMapthat ignores the value produced by this action.- Definition Classes
- IO
-
final
def
<*[E1 >: Nothing, B](io: ⇒ IO[E1, B]): IO[E1, A]
Sequences the specified action after this action, but ignores the value produced by the action.
Sequences the specified action after this action, but ignores the value produced by the action.
- Definition Classes
- IO
-
final
def
<>[E2, A1 >: A](that: ⇒ IO[E2, A1]): IO[E2, A1]
Alias for orElse.
Alias for orElse.
Executes this action and returns its value, if it succeeds, but otherwise executes the specified action.
- Definition Classes
- IO
-
final
def
<||>[E2, B](that: ⇒ IO[E2, B]): IO[E2, Either[A, B]]
Alias for orElseEither.
Alias for orElseEither.
Executes this action and returns its value, if it succeeds, but otherwise executes the specified action.
- Definition Classes
- IO
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
absolve[E1, B](implicit ev1: <:<[IO[Nothing, A], IO[E1, Either[E1, B]]]): IO[E1, B]
Submerges the error case of an
Eitherinto theIO.Submerges the error case of an
Eitherinto theIO. The inverse operation ofIO.attempt.- Definition Classes
- IO
-
final
def
as[A1 >: A]: IO[Nothing, A1]
Widens the action type to any supertype.
Widens the action type to any supertype. While
mapsuffices for this purpose, this method is significantly faster for this purpose.- Definition Classes
- IO
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
final
def
attempt: IO[Nothing, Either[Nothing, A]]
Executes this action, capturing both failure and success and returning the result in an
Either.Executes this action, capturing both failure and success and returning the result in an
Either. This method is useful for recovering fromIOactions that may fail.The error parameter of the returned
IOis Nothing, since it is guaranteed theIOaction does not raise any errors.- Definition Classes
- IO
-
final
def
bimap[E2, B](f: (Nothing) ⇒ E2, g: (A) ⇒ B): IO[E2, B]
Maps an
IO[E, A]into anIO[E2, B]by applying the specifiedE => E2andA => Bfunctions to the output of this action.Maps an
IO[E, A]into anIO[E2, B]by applying the specifiedE => E2andA => Bfunctions to the output of this action. Repeated applications ofbimap(io.bimap(f1, g1).bimap(f2, g2)...bimap(f10000, g20000)) are guaranteed stack safe to a depth of at least 10,000.- Definition Classes
- IO
-
final
def
bracket[E1 >: Nothing, B](release: (A) ⇒ IO[Nothing, _])(use: (A) ⇒ IO[E1, B]): IO[E1, B]
When this action represents acquisition of a resource (for example, opening a file, launching a thread, etc.),
bracketcan be used to ensure the acquisition is not interrupted and the resource is released.When this action represents acquisition of a resource (for example, opening a file, launching a thread, etc.),
bracketcan be used to ensure the acquisition is not interrupted and the resource is released.The function does two things:
1. Ensures this action, which acquires the resource, will not be interrupted. Of course, acquisition may fail for internal reasons (an uncaught exception). 2. Ensures the
releaseaction will not be interrupted, and will be executed so long as this action successfully acquires the resource.In between acquisition and release of the resource, the
useaction is executed.If the
releaseaction fails, then the entire action will fail even if theuseaction succeeds. If this fail-fast behavior is not desired, errors produced by thereleaseaction can be caught and ignored.openFile("data.json").bracket(closeFile) { file => for { header <- readHeader(file) ... } yield result }
- Definition Classes
- IO
-
final
def
bracket0[E1 >: Nothing, B](release: (A, Exit[E1, B]) ⇒ IO[Nothing, _])(use: (A) ⇒ IO[E1, B]): IO[E1, B]
A more powerful version of
bracketthat provides information on whether or notusesucceeded to the release action.A more powerful version of
bracketthat provides information on whether or notusesucceeded to the release action.- Definition Classes
- IO
-
final
def
bracketOnError[E1 >: Nothing, B](release: (A) ⇒ IO[Nothing, _])(use: (A) ⇒ IO[E1, B]): IO[E1, B]
Executes the release action only if there was an error.
Executes the release action only if there was an error.
- Definition Classes
- IO
-
final
def
bracket_[E1 >: Nothing, B](release: IO[Nothing, _])(use: IO[E1, B]): IO[E1, B]
A less powerful variant of
bracketwhere the value produced by this action is not needed.A less powerful variant of
bracketwhere the value produced by this action is not needed.- Definition Classes
- IO
-
final
def
catchAll[E2, A1 >: A](h: (Nothing) ⇒ IO[E2, A1]): IO[E2, A1]
Recovers from all errors.
Recovers from all errors.
openFile("config.json").catchAll(_ => IO.succeed(defaultConfig))
- Definition Classes
- IO
-
final
def
catchSome[E1 >: Nothing, A1 >: A](pf: PartialFunction[Nothing, IO[E1, A1]]): IO[E1, A1]
Recovers from some or all of the error cases.
Recovers from some or all of the error cases.
openFile("data.json").catchSome { case FileNotFoundException(_) => openFile("backup.json") }
- Definition Classes
- IO
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
const[B](b: ⇒ B): IO[Nothing, B]
Maps this action to the specified constant while preserving the effects of this action.
Maps this action to the specified constant while preserving the effects of this action.
- Definition Classes
- IO
-
final
def
delay(duration: Duration): IO[Nothing, A]
Delays this action by the specified amount of time.
Delays this action by the specified amount of time.
- Definition Classes
- IO
- val effect: (Env) ⇒ A
-
final
def
ensuring(finalizer: IO[Nothing, _]): IO[Nothing, A]
Executes the specified finalizer, whether this action succeeds, fails, or is interrupted.
Executes the specified finalizer, whether this action succeeds, fails, or is interrupted. This method should not be used for cleaning up resources, because it's possible the fiber will be interrupted after acquisition but before the finalizer is added.
- Definition Classes
- IO
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
flatMap[E1 >: Nothing, B](f0: (A) ⇒ IO[E1, B]): IO[E1, B]
Creates a composite action that represents this action followed by another one that may depend on the value produced by this one.
Creates a composite action that represents this action followed by another one that may depend on the value produced by this one.
val parsed = readFile("foo.txt").flatMap(file => parseFile(file))
- Definition Classes
- IO
-
final
def
flatMapError[E2](f: (Nothing) ⇒ IO[Nothing, E2]): IO[E2, A]
Creates a composite action that represents this action followed by another one that may depend on the error produced by this one.
Creates a composite action that represents this action followed by another one that may depend on the error produced by this one.
val parsed = readFile("foo.txt").flatMapError(error => logErrorToFile(error))
- Definition Classes
- IO
-
final
def
flatten[E1 >: Nothing, B](implicit ev1: <:<[A, IO[E1, B]]): IO[E1, B]
- Definition Classes
- IO
-
final
def
flip: IO[A, Nothing]
Swaps the error/value around, making it easier to handle errors.
Swaps the error/value around, making it easier to handle errors.
- Definition Classes
- IO
-
final
def
flipWith[A1, E1](f: (IO[A, Nothing]) ⇒ IO[A1, E1]): IO[E1, A1]
Swaps the error/value parameters, applies the function
fand flips the parameters backSwaps the error/value parameters, applies the function
fand flips the parameters back- Definition Classes
- IO
-
final
def
fold[B](err: (Nothing) ⇒ B, succ: (A) ⇒ B): IO[Nothing, B]
Less powerful version of
redeemwhich always returns a successfulIO[Nothing, B]after applying one of the given mapping functions depending on the result of thisIOLess powerful version of
redeemwhich always returns a successfulIO[Nothing, B]after applying one of the given mapping functions depending on the result of thisIO- Definition Classes
- IO
-
final
def
forever: IO[Nothing, Nothing]
Repeats this action forever (until the first error).
Repeats this action forever (until the first error). For more sophisticated schedules, see the
repeatmethod.- Definition Classes
- IO
-
final
def
fork: IO[Nothing, Fiber[Nothing, A]]
Forks this action into its own separate fiber, returning immediately without the value produced by this action.
Forks this action into its own separate fiber, returning immediately without the value produced by this action.
The
Fiber[E, A]returned by this action can be used to interrupt the forked fiber with some exception, or to join the fiber to "await" its computed value.for { fiber <- subtask.fork // Do stuff... a <- fiber.join } yield a
- Definition Classes
- IO
-
final
def
forkOn(ec: ExecutionContext): IO[Nothing, Fiber[Nothing, A]]
Forks an action that will be executed on the specified
ExecutionContext.Forks an action that will be executed on the specified
ExecutionContext.- Definition Classes
- IO
-
final
def
forkWith(handler: (Cause[Any]) ⇒ IO[Nothing, _]): IO[Nothing, Fiber[Nothing, A]]
A more powerful version of
forkthat allows specifying a handler to be invoked on any exceptions that are not handled by the forked fiber.A more powerful version of
forkthat allows specifying a handler to be invoked on any exceptions that are not handled by the forked fiber.- Definition Classes
- IO
-
final
def
get[E1 >: Nothing, B](implicit ev1: =:=[E1, Nothing], ev2: <:<[A, Option[B]]): IO[Unit, B]
Unwraps the optional success of this effect, but can fail with unit value.
Unwraps the optional success of this effect, but can fail with unit value.
- Definition Classes
- IO
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
lock(executor: Executor): IO[Nothing, A]
Locks the execution of this action to the specified executor.
Locks the execution of this action to the specified executor.
- Definition Classes
- IO
-
final
def
managed(release: (A) ⇒ IO[Nothing, _]): Managed[Nothing, A]
- Definition Classes
- IO
-
final
def
map[B](f: (A) ⇒ B): IO[Nothing, B]
Maps an
IO[E, A]into anIO[E, B]by applying the specifiedA => Bfunction to the output of this action.Maps an
IO[E, A]into anIO[E, B]by applying the specifiedA => Bfunction to the output of this action. Repeated applications ofmap(io.map(f1).map(f2)...map(f10000)) are guaranteed stack safe to a depth of at least 10,000.- Definition Classes
- IO
-
final
def
mapError[E2](f: (Nothing) ⇒ E2): IO[E2, A]
Maps over the error type.
Maps over the error type. This can be used to lift a "smaller" error into a "larger" error.
- Definition Classes
- IO
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
on(ec: ExecutionContext): IO[Nothing, A]
Executes the action on the specified
ExecutionContextand then shifts back to the default one.Executes the action on the specified
ExecutionContextand then shifts back to the default one.- Definition Classes
- IO
-
final
def
onError(cleanup: (Cause[Nothing]) ⇒ IO[Nothing, _]): IO[Nothing, A]
Runs the specified action if this action fails, providing the error to the action if it exists.
Runs the specified action if this action fails, providing the error to the action if it exists. The provided action will not be interrupted.
- Definition Classes
- IO
-
final
def
onInterrupt(cleanup: IO[Nothing, _]): IO[Nothing, A]
Runs the specified action if this action is interrupted.
Runs the specified action if this action is interrupted.
- Definition Classes
- IO
-
final
def
onTermination(cleanup: (Cause[Nothing]) ⇒ IO[Nothing, _]): IO[Nothing, A]
Runs the specified action if this action is terminated, either because of a defect or because of interruption.
Runs the specified action if this action is terminated, either because of a defect or because of interruption.
- Definition Classes
- IO
-
final
def
option: IO[Nothing, Option[A]]
Executes this action, skipping the error but returning optionally the success.
Executes this action, skipping the error but returning optionally the success.
- Definition Classes
- IO
-
final
def
orDie[E1 >: Nothing](implicit ev: =:=[E1, Throwable]): IO[Nothing, A]
Translates the checked error (if present) into termination.
Translates the checked error (if present) into termination.
- Definition Classes
- IO
-
final
def
orDieWith(f: (Nothing) ⇒ Throwable): IO[Nothing, A]
- Definition Classes
- IO
-
final
def
orElse[E2, A1 >: A](that: ⇒ IO[E2, A1]): IO[E2, A1]
Executes this action and returns its value, if it succeeds, but otherwise executes the specified action.
Executes this action and returns its value, if it succeeds, but otherwise executes the specified action.
- Definition Classes
- IO
-
final
def
orElseEither[E2, B](that: ⇒ IO[E2, B]): IO[E2, Either[A, B]]
Executes this action and returns its value, if it succeeds, but otherwise executes the specified action.
Executes this action and returns its value, if it succeeds, but otherwise executes the specified action.
- Definition Classes
- IO
-
final
def
peek[E1 >: Nothing, B](f: (A) ⇒ IO[E1, B]): IO[E1, A]
Calls the provided function with the result of this action, and sequences the resulting action after this action, but ignores the value produced by the action.
Calls the provided function with the result of this action, and sequences the resulting action after this action, but ignores the value produced by the action.
readFile("data.json").peek(putStrLn)- Definition Classes
- IO
-
final
def
race[E1 >: Nothing, A1 >: A](that: IO[E1, A1]): IO[E1, A1]
Races this action with the specified action, returning the first result to produce an
A, whichever it is.Races this action with the specified action, returning the first result to produce an
A, whichever it is. If neither action succeeds, then the action will fail with some error.- Definition Classes
- IO
-
def
raceAll[E1 >: Nothing, A1 >: A](ios: Iterable[IO[E1, A1]]): IO[E1, A1]
- Definition Classes
- IO
-
final
def
raceAttempt[E1 >: Nothing, A1 >: A](that: IO[E1, A1]): IO[E1, A1]
Races this action with the specified action, returning the first result to *finish*, whether it is by producing a value or by failing with an error.
Races this action with the specified action, returning the first result to *finish*, whether it is by producing a value or by failing with an error. If either of two actions fails before the other succeeds, the entire race will fail with that error.
- Definition Classes
- IO
-
final
def
raceEither[E1 >: Nothing, B](that: IO[E1, B]): IO[E1, Either[A, B]]
Races this action with the specified action, returning the first result to produce a value, whichever it is.
Races this action with the specified action, returning the first result to produce a value, whichever it is. If neither action succeeds, then the action will fail with some error.
- Definition Classes
- IO
-
final
def
raceWith[E1, E2, B, C](that: IO[E1, B])(leftDone: (Exit[Nothing, A], Fiber[E1, B]) ⇒ IO[E2, C], rightDone: (Exit[E1, B], Fiber[Nothing, A]) ⇒ IO[E2, C]): IO[E2, C]
Races this action with the specified action, invoking the specified finisher as soon as one value or the other has been computed.
Races this action with the specified action, invoking the specified finisher as soon as one value or the other has been computed.
- Definition Classes
- IO
-
final
def
redeem[E2, B](err: (Nothing) ⇒ IO[E2, B], succ: (A) ⇒ IO[E2, B]): IO[E2, B]
Recovers from errors by accepting one action to execute for the case of an error, and one action to execute for the case of success.
Recovers from errors by accepting one action to execute for the case of an error, and one action to execute for the case of success.
This method has better performance than
attemptsince no intermediate value is allocated and does not require subsequent calls toflatMapto define the next action.The error parameter of the returned
IOmay be chosen arbitrarily, since it will depend on theIOs returned by the given continuations.- Definition Classes
- IO
-
final
def
redeem0[E2, B](err: (Cause[Nothing]) ⇒ IO[E2, B], succ: (A) ⇒ IO[E2, B]): IO[E2, B]
A more powerful version of redeem that allows recovering from any kind of failure except interruptions.
A more powerful version of redeem that allows recovering from any kind of failure except interruptions.
- Definition Classes
- IO
-
final
def
repeat[B](schedule: Schedule[A, B], clock: Clock = Clock.Live): IO[Nothing, B]
Repeats this action with the specified schedule until the schedule completes, or until the first failure.
Repeats this action with the specified schedule until the schedule completes, or until the first failure. Repeats are done in addition to the first execution so that
io.repeat(Schedule.once)means "execute io and in case of success repeatioonce".- Definition Classes
- IO
-
final
def
repeatOrElse[E2, B](schedule: Schedule[A, B], orElse: (Nothing, Option[B]) ⇒ IO[E2, B], clock: Clock = Clock.Live): IO[E2, B]
Repeats this action with the specified schedule until the schedule completes, or until the first failure.
Repeats this action with the specified schedule until the schedule completes, or until the first failure. In the event of failure the progress to date, together with the error, will be passed to the specified handler.
- Definition Classes
- IO
-
final
def
repeatOrElse0[B, E2, C](schedule: Schedule[A, B], orElse: (Nothing, Option[B]) ⇒ IO[E2, C], clock: Clock = Clock.Live): IO[E2, Either[C, B]]
Repeats this action with the specified schedule until the schedule completes, or until the first failure.
Repeats this action with the specified schedule until the schedule completes, or until the first failure. In the event of failure the progress to date, together with the error, will be passed to the specified handler.
- Definition Classes
- IO
-
final
def
retry[E1 >: Nothing, S](policy: Schedule[E1, S], clock: Clock = Clock.Live): IO[E1, A]
Retries with the specified retry policy.
Retries with the specified retry policy. Retries are done following the failure of the original
io(up to a fixed maximum withonceorrecursfor example), so that thatio.retry(Schedule.once)means "executeioand in case of failure, try again once".- Definition Classes
- IO
-
final
def
retryOrElse[A2 >: A, E1 >: Nothing, S, E2](policy: Schedule[E1, S], orElse: (E1, S) ⇒ IO[E2, A2], clock: Clock = Clock.Live): IO[E2, A2]
Retries with the specified schedule, until it fails, and then both the value produced by the schedule together with the last error are passed to the recovery function.
Retries with the specified schedule, until it fails, and then both the value produced by the schedule together with the last error are passed to the recovery function.
- Definition Classes
- IO
-
final
def
retryOrElse0[E1 >: Nothing, S, E2, B](policy: Schedule[E1, S], orElse: (E1, S) ⇒ IO[E2, B], clock: Clock = Clock.Live): IO[E2, Either[B, A]]
Retries with the specified schedule, until it fails, and then both the value produced by the schedule together with the last error are passed to the recovery function.
Retries with the specified schedule, until it fails, and then both the value produced by the schedule together with the last error are passed to the recovery function.
- Definition Classes
- IO
-
final
def
run: IO[Nothing, Exit[Nothing, A]]
Runs this action in a new fiber, resuming when the fiber terminates.
Runs this action in a new fiber, resuming when the fiber terminates.
- Definition Classes
- IO
-
final
def
sandbox: IO[Cause[Nothing], A]
Runs this action in a new fiber, resuming when the fiber terminates.
Runs this action in a new fiber, resuming when the fiber terminates.
If the fiber fails with an error it will be captured in Right side of the error Either If the fiber terminates because of defect, list of defects will be captured in the Left side of the Either
Allows recovery from errors and defects alike, as in:
case class DomainError() val veryBadIO: IO[DomainError, Unit] = IO.sync(5 / 0) *> IO.fail(DomainError()) val caught: IO[Nothing, Unit] = veryBadIO.sandbox.catchAll { case Left((_: ArithmeticException) :: Nil) => // Caught defect: divided by zero! IO.succeed(0) case Left(ts) => // Caught unknown defects, shouldn't recover! IO.terminate0(ts) case Right(e) => // Caught error: DomainError! IO.succeed(0) }
- Definition Classes
- IO
-
final
def
sandboxWith[E2, B](f: (IO[Cause[Nothing], A]) ⇒ IO[Cause[E2], B]): IO[E2, B]
Companion helper to
sandbox.Companion helper to
sandbox.Has a performance penalty due to forking a new fiber.
Allows recovery, and partial recovery, from errors and defects alike, as in:
case class DomainError() val veryBadIO: IO[DomainError, Unit] = IO.sync(5 / 0) *> IO.fail(DomainError()) val caught: IO[DomainError, Unit] = veryBadIO.sandboxWith(_.catchSome { case Left((_: ArithmeticException) :: Nil) => // Caught defect: divided by zero! IO.succeed(0) })
Using
sandboxWithwithcatchSomeis better than usingio.sandbox.catchAllwith a partial match, because in the latter, if the match fails, the original defects will be lost and replaced by aMatchError- Definition Classes
- IO
-
final
def
summarized[E1 >: Nothing, B, C](f: (B, B) ⇒ C)(summary: IO[E1, B]): IO[E1, (C, A)]
Summarizes a action by computing some value before and after execution, and then combining the values to produce a summary, together with the result of execution.
Summarizes a action by computing some value before and after execution, and then combining the values to produce a summary, together with the result of execution.
- Definition Classes
- IO
-
final
def
supervise: IO[Nothing, A]
Supervises this action, which ensures that any fibers that are forked by the action are interrupted when this action completes.
Supervises this action, which ensures that any fibers that are forked by the action are interrupted when this action completes.
- Definition Classes
- IO
-
final
def
superviseWith(supervisor: (Iterable[Fiber[_, _]]) ⇒ IO[Nothing, _]): IO[Nothing, A]
Supervises this action, which ensures that any fibers that are forked by the action are handled by the provided supervisor.
Supervises this action, which ensures that any fibers that are forked by the action are handled by the provided supervisor.
- Definition Classes
- IO
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
tag: Int
An integer that identifies the term in the
IOsum type to which this instance belongs (e.g.An integer that identifies the term in the
IOsum type to which this instance belongs (e.g.IO.Tags.Point).- Definition Classes
- SyncEffect → IO
-
final
def
timed: IO[Nothing, (Duration, A)]
Returns a new action that executes this one and times the execution.
Returns a new action that executes this one and times the execution.
- Definition Classes
- IO
-
final
def
timed0[E1 >: Nothing](nanoTime: IO[E1, Long]): IO[E1, (Duration, A)]
A more powerful variation of
timedthat allows specifying the clock.A more powerful variation of
timedthat allows specifying the clock.- Definition Classes
- IO
-
final
def
timeout(d: Duration): IO[Nothing, Option[A]]
Times out an action by the specified duration.
Times out an action by the specified duration.
- Definition Classes
- IO
-
final
def
timeout0[B](z: B)(f: (A) ⇒ B)(duration: Duration): IO[Nothing, B]
Times out this action by the specified duration.
Times out this action by the specified duration.
IO.point(1).timeout0(Option.empty[Int])(Some(_))(1.second)
- Definition Classes
- IO
-
final
def
timeoutFail[E1 >: Nothing](e: E1)(d: Duration): IO[E1, A]
Flattens a nested action with a specified duration.
Flattens a nested action with a specified duration.
- Definition Classes
- IO
-
final
def
to[E1 >: Nothing, A1 >: A](p: Promise[E1, A1]): IO[Nothing, Boolean]
Keep or break a promise based on the result of this action.
Keep or break a promise based on the result of this action.
- Definition Classes
- IO
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
uninterruptible: IO[Nothing, A]
Performs this action non-interruptibly.
Performs this action non-interruptibly. This will prevent the action from being terminated externally, but the action may fail for internal reasons (e.g. an uncaught error) or terminate due to defect.
- Definition Classes
- IO
-
final
def
unsandbox[E1, A1 >: A](implicit ev1: <:<[IO[Nothing, A], IO[Cause[E1], A1]]): IO[E1, A1]
The inverse operation to
sandboxThe inverse operation to
sandboxTerminates with exceptions on the
Leftside of theEithererror, if it exists. Otherwise extracts the containedIO[E, A]- Definition Classes
- IO
-
final
def
unyielding: IO[Nothing, A]
Marks this action as unyielding to the runtime system for better scheduling.
Marks this action as unyielding to the runtime system for better scheduling.
- Definition Classes
- IO
-
final
def
void: IO[Nothing, Unit]
Maps this action to one producing unit, but preserving the effects of this action.
Maps this action to one producing unit, but preserving the effects of this action.
- Definition Classes
- IO
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
when[E1 >: Nothing](b: Boolean)(implicit ev1: <:<[IO[Nothing, A], IO[E1, Unit]]): IO[E1, Unit]
The moral equivalent of
if (p) expThe moral equivalent of
if (p) exp- Definition Classes
- IO
-
final
def
whenM[E1 >: Nothing](b: IO[Nothing, Boolean])(implicit ev1: <:<[IO[Nothing, A], IO[E1, Unit]]): IO[E1, Unit]
The moral equivalent of
if (p) expwhenphas side-effectsThe moral equivalent of
if (p) expwhenphas side-effects- Definition Classes
- IO
-
final
def
zip[E1 >: Nothing, B](that: IO[E1, B]): IO[E1, (A, B)]
Sequentially zips this effect with the specified effect, combining the results into a tuple.
Sequentially zips this effect with the specified effect, combining the results into a tuple.
- Definition Classes
- IO
-
final
def
zipPar[E1 >: Nothing, B](that: IO[E1, B]): IO[E1, (A, B)]
Executes both this action and the specified action in parallel, returning a tuple of their results.
Executes both this action and the specified action in parallel, returning a tuple of their results. If either individual action fails, then the returned action will fail.
- Definition Classes
- IO
-
final
def
zipWith[E1 >: Nothing, B, C](that: IO[E1, B])(f: (A, B) ⇒ C): IO[E1, C]
Sequentially zips this effect with the specified effect using the specified combiner function.
Sequentially zips this effect with the specified effect using the specified combiner function.
- Definition Classes
- IO
-
final
def
zipWithPar[E1 >: Nothing, B, C](that: IO[E1, B])(f: (A, B) ⇒ C): IO[E1, C]
Executes both this action and the specified action in parallel, combining their results using given function
f.Executes both this action and the specified action in parallel, combining their results using given function
f. If either individual action fails, then the returned action will fail.TODO: Replace with optimized primitive.
- Definition Classes
- IO