Packages

object FutureOps extends FutureOps

Linear Supertypes
FutureOps, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FutureOps
  2. FutureOps
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. val _unit: Future[Unit]
    Definition Classes
    FutureOps
  2. def background[A](self: Future[A])(implicit ec: ExecutionContext): Unit

    Run future in the background.

    Run future in the background. Discard the result of this Future but ensure if there is an exception it gets reported to the ExecutionContext

    Definition Classes
    FutureOps
    Annotations
    @inline()
  3. def firstSuccess[A](xa: Traversable[Future[A]])(implicit ec: ExecutionContext): Future[A]

    returns

    the first successfully completed future. If all futures fail, then completes the future with AsyncParThrowable of all failures.

    Definition Classes
    FutureOps
  4. def flatFold[A, X](self: Future[A], onSuccess: (A) ⇒ Future[X], onFailure: (Throwable) ⇒ Future[X])(implicit ec: ExecutionContext): Future[X]

    returns

    a Future of X that always succeeds. If self is successful, X is derived from onSuccess otherwise if self is a failure, X is derived from onFailure.

    Definition Classes
    FutureOps
  5. def fold[A, X](self: Future[A], onSuccess: (A) ⇒ X, onFailure: (Throwable) ⇒ X)(implicit ec: ExecutionContext): Future[X]

    returns

    a Future of X that always succeeds. If self is successful, X is derived from onSuccess otherwise if self is a failure, X is derived from onFailure.

    Definition Classes
    FutureOps
  6. def get[A](self: Future[A], max: Duration): A

    returns

    the result of the Future after it completes

    Definition Classes
    FutureOps
    Annotations
    @inline()
    Exceptions thrown

    java.util.concurrent.TimeoutException if Future does not complete within max duration

  7. def get[A](self: Future[A]): A

    returns

    the result of the Future after it completes (Note: this waits indefinitely for the Future to complete)

    Definition Classes
    FutureOps
    Annotations
    @inline()
    Exceptions thrown

    java.lang.Exception Future completed with a failure, throws the exception

  8. def getTry[A](self: Future[A], max: Duration): Try[A]

    returns

    the Try result of the Future after it completes

    Definition Classes
    FutureOps
    Annotations
    @inline()
    Exceptions thrown

    java.util.concurrent.TimeoutException if Future does not complete within max duration

  9. def getTry[A](self: Future[A]): Try[A]

    returns

    the Try result of the Future after it completes (Note: this waits indefinitely for the Future to complete)

    Definition Classes
    FutureOps
    Annotations
    @inline()
  10. def happensBefore[A](lhs: Future[Any], rhs: ⇒ Future[A])(implicit ec: ExecutionContext): DeferredFuture[A]

    returns

    a future of A that is guaranteed to happen before lhs

    Definition Classes
    FutureOps
  11. def nanoSpinDelay(delay_ns: Long): Long

    returns

    after spinning the current thread for delay_ns, returns the error between the requested delay and the actual delay. Use this function only when a precise delay is more important than overall performance.

    Definition Classes
    FutureOps
  12. def onTimeout[A](self: Future[A], timeout: FiniteDuration)(fallback: ⇒ Future[A])(implicit ec: ExecutionContext, sec: ScheduledExecutionContext): Future[A]

    returns

    a future that completes with fallback if the specified timeout is exceeded, otherwise the completed result of the future

    Definition Classes
    FutureOps
  13. def sideEffect[A](self: Future[A], sideEffect: ⇒ Unit)(implicit ec: ExecutionContext): Future[A]

    returns

    a future that completes once the supplied Future and the supplied side effect complete. The side effect runs after the supplied future completes even if it fails.

    Definition Classes
    FutureOps
  14. def toTry[A](self: Future[A])(implicit ec: ExecutionContext): Future[Try[A]]

    returns

    a Future of a Try of the result that always completes successfully even if the Future eventually throws an exception

    Definition Classes
    FutureOps
  15. def unit: Future[Unit]
    Definition Classes
    FutureOps
    Annotations
    @inline()