Packages

c

monix.eval.Task

DeprecatedExtensions

implicit final class DeprecatedExtensions[+A] extends AnyVal with Extensions[A]

Deprecated operations, described as extension methods.

Source
Task.scala
Linear Supertypes
Extensions[A], AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DeprecatedExtensions
  2. Extensions
  3. AnyVal
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new DeprecatedExtensions(self: Task[A])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  6. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  7. val self: Task[A]
    Definition Classes
    DeprecatedExtensions → Extensions
  8. def toString(): String
    Definition Classes
    Any

Deprecated Value Members

  1. def cancelable: Task[A]

    DEPRECATED — since Monix 3.0 the Task implementation has switched to auto-cancelable run-loops by default (which can still be turned off in its configuration).

    DEPRECATED — since Monix 3.0 the Task implementation has switched to auto-cancelable run-loops by default (which can still be turned off in its configuration).

    For ensuring the old behavior, you can use executeWithOptions.

    Definition Classes
    Extensions
    Annotations
    @deprecated
    Deprecated

    (Since version 3.0.0) Switch to executeWithOptions(_.enableAutoCancelableRunLoops)

  2. def coeval(implicit s: Scheduler): Coeval[Either[CancelableFuture[A], A]]

    DEPRECATED — replace with usage of Task.runSyncStep:

    DEPRECATED — replace with usage of Task.runSyncStep:

    task.coeval <-> Coeval(task.runSyncStep)

    Definition Classes
    Extensions
    Annotations
    @deprecated
    Deprecated

    (Since version 3.0.0-RC2) Replaced with Coeval(task.runSyncStep)

  3. def delayExecutionWith(trigger: Task[Any]): Task[A]

    DEPRECATED — please use flatMap.

    DEPRECATED — please use flatMap.

    The reason for the deprecation is that this operation is redundant, as it can be expressed with flatMap, with the same effect:

    import monix.eval.Task
    
    val trigger = Task(println("do it"))
    val task = Task(println("must be done now"))
    trigger.flatMap(_ => task)

    The syntax provided by Cats can also help:

    import cats.syntax.all._
    
    trigger *> task
    Definition Classes
    Extensions
    Annotations
    @deprecated
    Deprecated

    (Since version 3.0.0) Please use flatMap

  4. def delayResultBySelector[B](selector: (A) => Task[B]): Task[A]

    DEPRECATED — please use flatMap.

    DEPRECATED — please use flatMap.

    The reason for the deprecation is that this operation is redundant, as it can be expressed with flatMap and map, with the same effect:

    import monix.eval.Task
    
    val task = Task(5)
    val selector = (n: Int) => Task(n.toString)
    task.flatMap(a => selector(a).map(_ => a))
    Definition Classes
    Extensions
    Annotations
    @deprecated
    Deprecated

    (Since version 3.0.0) Please rewrite in terms of flatMap

  5. def executeWithFork: Task[A]

    DEPRECATED — renamed to executeAsync.

    DEPRECATED — renamed to executeAsync.

    The reason for the deprecation is the repurposing of the word "fork".

    Definition Classes
    Extensions
    Annotations
    @deprecated
    Deprecated

    (Since version 3.0.0) Renamed to Task!.executeAsync

  6. def fork: Task[Fiber[A]]

    DEPRECATED — subsumed by start.

    DEPRECATED — subsumed by start.

    To be consistent with cats-effect 1.1.0, start now enforces an asynchronous boundary, being exactly the same as fork from 3.0.0-RC1

    Definition Classes
    Extensions
    Annotations
    @deprecated
    Deprecated

    (Since version 3.0.0-RC2) Replaced with start

  7. def runAsync(implicit s: Scheduler): CancelableFuture[A]

    DEPRECATED — renamed to runToFuture, otherwise due to overloading we can get a pretty bad conflict with the callback-driven Task.runAsync.

    DEPRECATED — renamed to runToFuture, otherwise due to overloading we can get a pretty bad conflict with the callback-driven Task.runAsync.

    The naming is also nice for discovery.

    Definition Classes
    Extensions
    Annotations
    @UnsafeBecauseImpure() @deprecated
    Deprecated

    (Since version 3.0.0) Renamed to Task.runToFuture

  8. def runAsyncOpt(implicit s: Scheduler, opts: Options): CancelableFuture[A]

    DEPRECATED — renamed to runAsyncOpt, otherwise due to overloading we can get a pretty bad conflict with the callback-driven Task.runToFutureOpt.

    DEPRECATED — renamed to runAsyncOpt, otherwise due to overloading we can get a pretty bad conflict with the callback-driven Task.runToFutureOpt.

    The naming is also nice for discovery.

    Definition Classes
    Extensions
    Annotations
    @UnsafeBecauseImpure() @deprecated
    Deprecated

    (Since version 3.0.0) Renamed to Task.runAsyncOpt

  9. def runOnComplete(f: (Try[A]) => Unit)(implicit s: Scheduler): Cancelable

    DEPRECATED — switch to Task.runToFuture in combination with Callback.fromTry instead.

    DEPRECATED — switch to Task.runToFuture in combination with Callback.fromTry instead.

    If for example you have a Try[A] => Unit function, you can replace usage of runOnComplete with:

    task.runAsync(Callback.fromTry(f))

    A more common usage is via Scala's Promise, but with a Promise reference this construct would be even more efficient:

    task.runAsync(Callback.fromPromise(p))

    Definition Classes
    Extensions
    Annotations
    @UnsafeBecauseImpure() @deprecated
    Deprecated

    (Since version 3.0.0) Please use Task.runAsync

  10. def runSyncMaybe(implicit s: Scheduler): Either[CancelableFuture[A], A]

    DEPRECATED — switch to Task.runSyncStep or to Task.runToFuture.

    DEPRECATED — switch to Task.runSyncStep or to Task.runToFuture.

    The runToFuture operation that returns CancelableFuture will return already completed future values, useful for low level optimizations. All this runSyncMaybe did was to piggyback on it.

    The reason for the deprecation is to reduce the unneeded "run" overloads.

    Definition Classes
    Extensions
    Annotations
    @UnsafeBecauseImpure() @deprecated
    Deprecated

    (Since version 3.0.0) Please use Task.runSyncStep

  11. def runSyncMaybeOpt(implicit s: Scheduler, opts: Options): Either[CancelableFuture[A], A]

    DEPRECATED — switch to Task.runSyncStepOpt or to runAsync.

    DEPRECATED — switch to Task.runSyncStepOpt or to runAsync.

    The runAsyncOpt variant that returns CancelableFuture will return already completed future values, useful for low level optimizations. All this runSyncMaybeOpt did was to piggyback on it.

    The reason for the deprecation is to reduce the unneeded "run" overloads.

    Definition Classes
    Extensions
    Annotations
    @UnsafeBecauseImpure() @deprecated
    Deprecated

    (Since version 3.0.0) Please use Task.runAsyncOpt

  12. def toIO(implicit eff: ConcurrentEffect[Task]): IO[A]

    DEPRECATED — replace with usage of Task.to:

    DEPRECATED — replace with usage of Task.to:

    import cats.effect.IO
    import monix.execution.Scheduler.Implicits.global
    import monix.eval.Task
    
    Task(1 + 1).to[IO]
    Definition Classes
    Extensions
    Annotations
    @deprecated
    Deprecated

    (Since version 3.0.0-RC3) Switch to task.to[IO]

  13. def transform[R](fa: (A) => R, fe: (Throwable) => R): Task[R]

    DEPRECATED — use redeem instead.

    DEPRECATED — use redeem instead.

    Task.redeem is the same operation, but with a different name and the function parameters in an inverted order, to make it consistent with fold on Either and others (i.e. the function for error recovery is at the left).

    Definition Classes
    Extensions
    Annotations
    @deprecated
    Deprecated

    (Since version 3.0.0-RC2) Please use Task.redeem

  14. def transformWith[R](fa: (A) => Task[R], fe: (Throwable) => Task[R]): Task[R]

    DEPRECATED — use redeemWith instead.

    DEPRECATED — use redeemWith instead.

    Task.redeemWith is the same operation, but with a different name and the function parameters in an inverted order, to make it consistent with fold on Either and others (i.e. the function for error recovery is at the left).

    Definition Classes
    Extensions
    Annotations
    @deprecated
    Deprecated

    (Since version 3.0.0-RC2) Please use Task.redeemWith

  15. def zip[B](that: Task[B]): Task[(A, B)]

    DEPRECATED — switch to Task.parZip2, which has the same behavior.

    DEPRECATED — switch to Task.parZip2, which has the same behavior.

    Definition Classes
    Extensions
    Annotations
    @deprecated
    Deprecated

    (Since version 3.0.0-RC2) Switch to Task.parZip2

  16. def zipMap[B, C](that: Task[B])(f: (A, B) => C): Task[C]

    DEPRECATED — switch to Task.parMap2, which has the same behavior.

    DEPRECATED — switch to Task.parMap2, which has the same behavior.

    Definition Classes
    Extensions
    Annotations
    @deprecated
    Deprecated

    (Since version 3.0.0-RC2) Use Task.parMap2

Inherited from Extensions[A]

Inherited from AnyVal

Inherited from Any

Ungrouped