package execution
- Alphabetic
- Public
- All
Type Members
-
sealed abstract
class
Ack
extends Future[Ack] with Serializable
Represents an acknowledgement of processing that a consumer sends back upstream.
Represents an acknowledgement of processing that a consumer sends back upstream. Useful to implement back-pressure.
-
trait
Cancelable
extends Serializable
Represents a one-time idempotent action that can be used to cancel async computations, or to release resources that active data sources are holding.
Represents a one-time idempotent action that can be used to cancel async computations, or to release resources that active data sources are holding.
It is equivalent to
java.io.Closeable
, but without the I/O focus, or toIDisposable
in Microsoft .NET, or toakka.actor.Cancellable
. -
trait
CancelableFuture
[+T] extends Future[T] with Cancelable
Represents an asynchronous computation that can be canceled as long as it isn't complete.
-
sealed abstract
class
ExecutionModel
extends Product with Serializable
Specification for run-loops, imposed by the
Scheduler
.Specification for run-loops, imposed by the
Scheduler
.When executing tasks, a run-loop can always execute tasks asynchronously (by forking logical threads), or it can always execute them synchronously (same thread and call-stack, by using an internal trampoline), or it can do a mixed mode that executes tasks in batches before forking.
The specification is considered a recommendation for how run loops should behave, but ultimately it's up to the client to choose the best execution model. This can be related to recursive loops or to events pushed into consumers.
-
trait
Listener
[-A] extends Serializable
A simple listener interface, to be used in observer pattern implementations or for specifying asynchronous callbacks.
A simple listener interface, to be used in observer pattern implementations or for specifying asynchronous callbacks.
This interface does not provide any usage contract or assumptions on how the
onValue(a)
function gets called.It's a replacement for
Function1[A,Unit]
but it does not inherit from it, precisely because we want to attachListener
semantics to types that cannot beFunction1[A,Unit]
.In particular
monix.eval.Callback
is a supertype ofListener
, even thoughCallback
is aTry[T] => Unit
. -
class
Macros
extends InlineMacros with HygieneUtilMacros
Various implementations for AckExtensions and Scheduler.
Various implementations for AckExtensions and Scheduler.
- Annotations
- @bundle()
-
trait
Scheduler
extends ExecutionContext with UncaughtExceptionReporter with Executor
A Scheduler is an
scala.concurrent.ExecutionContext
that additionally can schedule the execution of units of work to run with a delay or periodically.A Scheduler is an
scala.concurrent.ExecutionContext
that additionally can schedule the execution of units of work to run with a delay or periodically.- Annotations
- @implicitNotFound( ... )
-
trait
UncaughtExceptionReporter
extends Serializable
An exception reporter is a function that logs an uncaught error.
An exception reporter is a function that logs an uncaught error.
Usually taken as an implicit when executing computations that could fail, but that must not blow up the call-stack, like asynchronous tasks.
A default implicit is provided that simply logs the error on STDERR.
- Annotations
- @implicitNotFound( ... )
Value Members
- object Ack extends Serializable
- object Cancelable extends Serializable
- object CancelableFuture extends Serializable
- object ExecutionModel extends Serializable
-
object
FutureUtils
Utilities for Scala's standard
concurrent.Future
. - object Listener extends Serializable
- object Scheduler extends SchedulerCompanionImpl with Serializable
- object UncaughtExceptionReporter extends Serializable
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.eval is for dealing with evaluation of results, thus exposing Task and Coeval.
monix.reactive exposes the
Observable
pattern:Observable
implementationsmonix.types implements type-class shims, to be translated to type-classes provided by libraries such as Cats or Scalaz.
monix.cats is the optional integration with the Cats library, providing translations for the types described in
monix.types
.monix.scalaz is the optional integration with the Scalaz library, providing translations for the types described in
monix.types
.