Object

com.thoughtworks

future

Related Doc: package thoughtworks

Permalink

object future

The name space that contains Future and utilities for Future.

Usage

Features of Future are provided as implicit views or type classes. To enable those features, import all members under future along with Scalaz syntax.

import scalaz.syntax.all._
import com.thoughtworks.future._
Author:

杨博 (Yang Bo)

Source
future.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. future
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type Future[+A] = future.OpacityTypes.Future[A]

    Permalink

    An asynchronous task.

    An asynchronous task.

    Note

    Unlike scala.concurrent.Future, this Future is not memoized by default.

    var count = 0
    val notMemoized = Future.delay {
      count += 1
    }
    count should be(0);
    (
      for {
        _ <- notMemoized
        _ = count should be(1)
        _ <- notMemoized
        _ = count should be(2)
        _ <- notMemoized
      } yield (count should be(3))
    ).toScalaFuture
    ,

    A Future can be memoized manually by converting this Future to a scala.concurrent.Future and then converting back.

    var count = 0
    val notMemoized = Future.delay {
      count += 1
    }
    val memoized = notMemoized.toScalaFuture.toThoughtworksFuture;
    (
      for {
        _ <- memoized
        _ = count should be(1)
        _ <- memoized
        _ = count should be(1)
        _ <- memoized
      } yield (count should be(1))
    ).toScalaFuture
    See also

    ThoughtworksFutureOps for methods available on this Future.

    ParallelFuture for parallel version of this Future.

  2. final case class MultipleException(throwableSet: Set[Throwable]) extends RuntimeException with Product with Serializable

    Permalink
  3. type ParallelFuture[A] = AnyRef { ... /* 2 definitions in type refinement */ }

    Permalink

    Parallel-tagged type of Future that needs to be executed in parallel when using an scalaz.Applicative instance

  4. implicit final class ScalaFutureToThoughtworksFutureOps[A] extends AnyRef

    Permalink

    Extension methods for scala.concurrent.Future

  5. implicit final class ThoughtworksFutureOps[A] extends AnyVal

    Permalink

    Extension methods for Future

  6. implicit final class UnitContinuationToThoughtworksFutureOps[A] extends AnyRef

    Permalink

    Extension methods for UnitContinuation

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object Future extends JvmFutureCompanion

    Permalink
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. implicit def futureMonadError: MonadError[Future, Throwable] with BindRec[Future]

    Permalink

    Annotations
    @inline()
  11. implicit def futureParallelApplicative(implicit throwableSemigroup: Semigroup[Throwable]): Applicative[ParallelFuture]

    Permalink

    Annotations
    @inline()
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. implicit object multipleExceptionThrowableSemigroup extends Semigroup[Throwable]

    Permalink
  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  20. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Implicit Views

Type class instances

Ungrouped