object Task

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

Type Members

  1. type ParallelTask[A] = TagModule.@@[Task[A], Parallel]

    type for Tasks which need to be executed in parallel when using an Applicative instance

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def Try[A](a: => A): \/[Throwable, A]

    Utility function - evaluate a and catch and return any exceptions.

  5. def apply[A](a: => A)(implicit pool: ExecutorService = Strategy.DefaultExecutorService): Task[A]

    Create a Task that will evaluate a using the given ExecutorService.

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def async[A](register: ((\/[Throwable, A]) => Unit) => Unit): Task[A]

    Create a Task from an asynchronous computation, which takes the form of a function with which we can register a callback.

    Create a Task from an asynchronous computation, which takes the form of a function with which we can register a callback. This can be used to translate from a callback-based API to a straightforward monadic version.

  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  9. def delay[A](a: => A): Task[A]

    Promote a non-strict value to a Task, catching exceptions in the process.

    Promote a non-strict value to a Task, catching exceptions in the process. Note that since Task is unmemoized, this will recompute a each time it is sequenced into a larger computation. Memoize a with a lazy value before calling this function if memoization is desired.

  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. def fail(e: Throwable): Task[Nothing]

    A Task which fails with the given Throwable.

  13. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  14. def fork[A](a: => Task[A])(implicit pool: ExecutorService = Strategy.DefaultExecutorService): Task[A]

    Returns a Task that produces the same result as the given Future, but forks its evaluation off into a separate (logical) thread, using the given ExecutorService.

    Returns a Task that produces the same result as the given Future, but forks its evaluation off into a separate (logical) thread, using the given ExecutorService. Note that this forking is only described by the returned Task--nothing occurs until the Task is run.

  15. def fromDisjunction[A <: Throwable, B](x: \/[A, B]): Task[B]
  16. def fromMaybe[A](ma: Maybe[A])(t: => Throwable): Task[A]
  17. def gatherUnordered[A](tasks: Seq[Task[A]], exceptionCancels: Boolean = false): Task[List[A]]

    Like Nondeterminism[Task].gatherUnordered, but if exceptionCancels is true, exceptions in any task try to immediately cancel all other running tasks.

    Like Nondeterminism[Task].gatherUnordered, but if exceptionCancels is true, exceptions in any task try to immediately cancel all other running tasks. If exceptionCancels is false, in the event of an error, all tasks are run to completion before the error is returned.

    Since

    7.0.3

  18. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. def now[A](a: A): Task[A]

    Convert a strict value to a Task.

    Convert a strict value to a Task. Also see delay.

  25. def point[A](a: => A): Task[A]
  26. def reduceUnordered[A, M](tasks: Seq[Task[A]], exceptionCancels: Boolean = false)(implicit R: Reducer[A, M]): Task[M]
  27. def schedule[A](a: => A, delay: Duration)(implicit pool: ScheduledExecutorService = Strategy.DefaultTimeoutScheduler): Task[A]
  28. def suspend[A](a: => Task[A]): Task[A]

    Produce f in the main trampolining loop, Future.step, using a fresh call stack.

    Produce f in the main trampolining loop, Future.step, using a fresh call stack. The standard trampolining primitive, useful for avoiding stack overflows.

  29. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  30. def tailrecM[A, B](f: (A) => Task[\/[A, B]])(a: A): Task[B]
  31. implicit val taskInstance: Nondeterminism[Task] with BindRec[Task] with Catchable[Task] with MonadError[Task, Throwable]
  32. implicit val taskParallelApplicativeInstance: Applicative[ParallelTask]

    This Applicative instance runs Tasks in parallel.

    This Applicative instance runs Tasks in parallel.

    It is different from the Applicative instance obtained from Monad[Task] which runs tasks sequentially.

  33. def toString(): String
    Definition Classes
    AnyRef → Any
  34. def unsafeStart[A](a: => A)(implicit pool: ExecutorService = Strategy.DefaultExecutorService): Task[A]

    Create a Task that starts evaluating a using the given ExecutorService right away.

    Create a Task that starts evaluating a using the given ExecutorService right away. This will start executing side effects immediately, and is thus morally equivalent to unsafePerformIO. The resulting Task cannot be rerun to repeat the effects. Use with care.

  35. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  36. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  37. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  38. object TaskInterrupted extends InterruptedException with Product with Serializable

    signals task was interrupted *

Inherited from AnyRef

Inherited from Any

Ungrouped