scalaz.concurrent

Promise

sealed class Promise[A] extends () ⇒ A

Represents an expression that is evaluated asynchronously, according to some evaluation strategy.

Source
Promise.scala
Linear Supertypes
() ⇒ A, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Promise
  2. Function0
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Promise()(implicit strategy: Strategy)

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def apply(): A

    Syncrhonously blocks until the value is ready, then returns it.

    Syncrhonously blocks until the value is ready, then returns it. WARNING: May block indefinitely. A kitten dies every time you call this method.

    Definition Classes
    Promise → Function0
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def break: Unit

    Breaks the promise.

    Breaks the promise. After this method finishes, any registered continuation will not receive the value. If evaluation has not yet started, it will never start.

  9. def broken: Boolean

    Indicates whether the promise has been broken.

    Indicates whether the promise has been broken. A broken promise is never fulfilled.

  10. def clone(): AnyRef

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

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

    Definition Classes
    AnyRef → Any
  13. def errorTo(k: (Throwable) ⇒ Unit): Unit

    Registers the given error handler as a continuation receiving errors thrown by the evaluation.

  14. def filter(p: (A) ⇒ Boolean): Promise[A]

    Returns a promise that is only ever fulfilled if the value of this promise matches the given predicate.

  15. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  16. def flatMap[B](f: (A) ⇒ Promise[B]): Promise[B]

    Registers the given function as a continuation, returning the result of that function.

  17. def fulfill(a: ⇒ A): Unit

    Sets the value of this promise, out of band.

    Sets the value of this promise, out of band. WARNING: Once the value of a promise is set, it is forever immutable.

  18. def fulfilled: Boolean

    Indicates whether the evaluation of this promise has finished.

  19. def get: A

    Syncrhonously blocks until the value is ready, then returns it.

    Syncrhonously blocks until the value is ready, then returns it. WARNING: May block indefinitely. A kitten dies every time you call this method.

  20. final def getClass(): Class[_]

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

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

    Definition Classes
    Any
  23. def map[B](f: (A) ⇒ B): Promise[B]

    Registers the given function as a continuation, returning a promise of the result.

  24. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  27. def spec[B](f: (A) ⇒ B, actual: Promise[A])(implicit equality: Equal[A]): Promise[B]

    Speculative concurrency.

    Speculative concurrency. In the expression guess.spec(f, actual) the value of guess is an inexpensive guess at the value and actual is the actual value, usually a more expensive computation. The function f is speculatively applied to the guess. Once the actual value is available, it's compared with the guess. If the guess was correct, we will have already applied f to the correct value, saving time. If the guess was incorrect, then f is applied to the value of actual.

  28. implicit val strategy: Strategy

  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  30. def threw: Boolean

    Indicates whether the evaluation of this promise threw an error.

  31. def to(k: (A) ⇒ Unit): Unit

    Registers the given actor or effect as a continuation receiving the promised value.

  32. def toString(): String

    Definition Classes
    Promise → Function0 → AnyRef → Any
  33. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from () ⇒ A

Inherited from AnyRef

Inherited from Any

Ungrouped