sealed trait Task[+A] extends AnyRef
This task was introduced as a compatibilty layer to ublock bloop migration from monix2. there is an important difference between monix2 and monix3 in cancellation mechanic:
- monix2 - cancel is a signal that triggers
doOnCancel
callbacks and the whole task anyway completes. - monix3 - cancel actually cancel the runLoop of task and turns
CancellableFuture
into incomletable one.
Bloop is hugely relies on doOnCancel
usage and old cancellation mechanic.
Actually, most of bsp-methods are kind of function (Input, State) => State
.
runLoop cancellation doesn't fit for bloop at all.
So the idea is: perform cancels as in monix2, do an actual execution on monix3.
This approach allows to unblock bsp4s/monix/scala upgrades (monix2 isn't supported and isn't published for scala 2.13).
In theory we can switch it on some other effect-library and preserve the codebase without significant rewrites.
- Self Type
- Task[A]
Linear Supertypes
Known Subclasses
Ordering
- Alphabetic
- By Inheritance
Inherited
- Task
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def *>[B](f: ⇒ Task[B]): Task[B]
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def as[B](b: ⇒ B): Task[B]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- final def asyncBoundary(s: Scheduler): Task[A]
- final def asyncBoundary: Task[A]
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @IntrinsicCandidate()
- def delayExecution(timespan: FiniteDuration): Task[A]
- final def dematerialize[B](implicit ev: <:<[A, Try[B]]): Task[B]
- final def doOnCancel(f: ⇒ Task[Unit]): Task[A]
- final def doOnFinish(f: (Option[Throwable]) ⇒ Task[Unit]): Task[A]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def executeAsync: Task[A]
- final def executeOn(s: Scheduler, forceAsync: Boolean = true): Task[A]
- def failed: Task[Throwable]
- final def flatMap[B](f: (A) ⇒ Task[B]): Task[B]
- final def flatten[B](implicit ev: <:<[A, Task[B]]): Task[B]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def map[B](f: (A) ⇒ B): Task[B]
- final def materialize: Task[Try[A]]
- final def memoize: Task[A]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def onErrorFallbackTo[U >: A](f: Task[U]): Task[U]
- def onErrorHandleWith[B >: A](f: (Throwable) ⇒ Task[B]): Task[B]
- def onErrorRecover[U >: A](pf: PartialFunction[Throwable, U]): Task[U]
- def onErrorRestartIf(f: (Throwable) ⇒ Boolean): Task[A]
- def restartUntil(f: (A) ⇒ Boolean): Task[A]
- def runAsync(implicit s: Scheduler): CancelableFuture[A]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- def timeout(duration: FiniteDuration): Task[A]
- def timeoutTo[B >: A](duration: FiniteDuration, backup: Task[B]): Task[B]
- def toMonixTask(implicit sh: Scheduler): monix.eval.Task[A]
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- final def transform[R](fa: (A) ⇒ R, fe: (Throwable) ⇒ R): Task[R]
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated