Class/Object

scalaz.concurrent

Task

Related Docs: object Task | package concurrent

Permalink

class Task[+A] extends AnyRef

Source
Task.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Task
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Task(get: Future[\/[Throwable, A]])

    Permalink

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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def attempt: Task[\/[Throwable, A]]

    Permalink

    'Catches' exceptions in the given task and returns them as values.

  6. def attemptRun: \/[Throwable, A]

    Permalink

    Like run, but returns exceptions as values.

  7. def clone(): AnyRef

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def flatMap[B](f: (A) ⇒ Task[B]): Task[B]

    Permalink
  12. val get: Future[\/[Throwable, A]]

    Permalink
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def handle[B >: A](f: PartialFunction[Throwable, B]): Task[B]

    Permalink

    Calls attempt and handles some exceptions using the given partial function, calling Task.now on the result.

    Calls attempt and handles some exceptions using the given partial function, calling Task.now on the result. Any nonmatching exceptions are reraised.

  15. def handleWith[B >: A](f: PartialFunction[Throwable, Task[B]]): Task[B]

    Permalink

    Calls attempt and handles some exceptions using the given partial function.

    Calls attempt and handles some exceptions using the given partial function. Any nonmatching exceptions are reraised.

  16. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  18. def map[B](f: (A) ⇒ B): Task[B]

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

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

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

    Permalink
    Definition Classes
    AnyRef
  22. def onFinish(f: (Option[Throwable]) ⇒ Task[Unit]): Task[A]

    Permalink

    Returns a new Task in which f is scheduled to be run on completion.

    Returns a new Task in which f is scheduled to be run on completion. This would typically be used to release any resources acquired by this Task.

  23. def or[B >: A](t2: Task[B]): Task[B]

    Permalink

    Runs this Task, and if it fails with an exception, runs t2.

    Runs this Task, and if it fails with an exception, runs t2. This is rather coarse-grained. Use attempt, handle, and flatMap for more fine grained control of exception handling.

  24. def run: A

    Permalink

    Run this Task and block until its result is available.

    Run this Task and block until its result is available. This will throw any exceptions generated by the Task. To return exceptions in an \/, use attemptRun.

  25. def runAsync(f: (\/[Throwable, A]) ⇒ Unit): Unit

    Permalink

    Run this computation to obtain either a result or an exception, then invoke the given callback.

    Run this computation to obtain either a result or an exception, then invoke the given callback. Any pure, non-asynchronous computation at the head of this Task will be forced in the calling thread. At the first Async encountered, control to whatever thread backs the Async and this function returns immediately.

  26. def runAsyncInterruptibly(f: (\/[Throwable, A]) ⇒ Unit): () ⇒ Unit

    Permalink

    Similar to runAsyncInterruptibly(f,cancel) except instead of interrupting by setting cancel to true, It returns the function, that, when applied will interrupt the task.

    Similar to runAsyncInterruptibly(f,cancel) except instead of interrupting by setting cancel to true, It returns the function, that, when applied will interrupt the task.

    This allows "deterministic" completion of task computation even if it was interrupted. That means task will complete even when interrupted, but with TaskInterrupted exception.

    Note 1: When Interrupted, the f callback will run in thread that called the Interrupting function () => Unit Note 2: If task has handler like attempt, it won't get consulted for handling TaskInterrupted excpetion

  27. def runAsyncInterruptibly(f: (\/[Throwable, A]) ⇒ Unit, cancel: AtomicBoolean): Unit

    Permalink

    Run this computation to obtain an A, so long as cancel remains false.

    Run this computation to obtain an A, so long as cancel remains false. Because of trampolining, we get frequent opportunities to cancel while stepping through the trampoline, this should provide a fairly robust means of cancellation.

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

    Permalink
    Definition Classes
    AnyRef
  29. def timed(timeoutInMillis: Long): Task[A]

    Permalink

    A Task which returns a TimeoutException after timeoutInMillis, and attempts to cancel the running computation.

  30. def toString(): String

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

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped