object CancelablePromise
- Source
- CancelablePromise.scala
- Alphabetic
- By Inheritance
- CancelablePromise
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- def apply[A](ps: PaddingStrategy = NoPadding): CancelablePromise[A]
Builds an empty CancelablePromise object.
Builds an empty CancelablePromise object.
- A
the type of the value in the promise
- ps
is a configurable PaddingStrategy to avoid the false sharing problem
- returns
the newly created promise object
- def failed[A](e: Throwable): CancelablePromise[A]
Creates a CancelablePromise that's already completed in error.
Creates a CancelablePromise that's already completed in error.
- e
is the error to signal to subscribers
- returns
the newly created promise object
- def fromTry[A](value: Try[A]): CancelablePromise[A]
Creates an already completed CancelablePromise with the specified result or exception.
Creates an already completed CancelablePromise with the specified result or exception.
- value
is the scala.util.Try result to signal to subscribers
- returns
the newly created promise object
- def successful[A](value: A): CancelablePromise[A]
Creates a CancelablePromise that's already completed with the given successful result.
Creates a CancelablePromise that's already completed with the given successful result.
- value
is the successful result to signal to subscribers
- returns
the newly created promise object
This is the API documentation for the Monix library.
Package Overview
monix.execution exposes lower level primitives for dealing with asynchronous execution:
Atomic
types, as alternative tojava.util.concurrent.atomic
monix.catnap exposes pure abstractions built on top of the Cats-Effect type classes:
monix.eval is for dealing with evaluation of results, thus exposing Task and Coeval.
monix.reactive exposes the
Observable
pattern:Observable
implementationsmonix.tail exposes Iterant for purely functional pull based streaming:
Batch
andBatchCursor
, the alternatives to Scala'sIterable
andIterator
respectively that we are using within Iterant's encodingYou can control evaluation with type you choose - be it Task, Coeval, cats.effect.IO or your own as long as you provide correct cats-effect or cats typeclass instance.