Utilities complementing the Scheduler
interface.
The default ScheduledExecutor
instance.
The default ScheduledExecutor
instance.
Currently it's a single-threaded Java ScheduledExecutorService
used for scheduling delayed tasks for execution. But the actual
execution will not happen on this executor service. In general
you can just reuse this one for all your scheduling needs.
Scheduler builder - uses monix's
default ScheduledExecutorService
for handling the scheduling of tasks.
Scheduler builder - uses monix's
default ScheduledExecutorService
for handling the scheduling of tasks.
Uses Scala's s.c.ExecutionContext.global
for actual execution.
is the preferred ExecutionModel, a guideline for run-loops and producers of data. Use ExecutionModel.Default for the default.
Scheduler builder - uses monix's
default ScheduledExecutorService
for handling the scheduling of tasks.
Scheduler builder - uses monix's
default ScheduledExecutorService
for handling the scheduling of tasks.
Uses Scala's s.c.ExecutionContext.global
for actual execution.
is the UncaughtExceptionReporter that logs uncaught exceptions.
Wrap the given ExecutionContext.reportFailure
or use
UncaughtExceptionReporter.LogExceptionsToStandardErr for
the default.
is the preferred ExecutionModel, a guideline for run-loops and producers of data. Use ExecutionModel.Default for the default.
Scheduler builder - uses monix's
default ScheduledExecutorService
for handling the scheduling of tasks.
Scheduler builder - uses monix's
default ScheduledExecutorService
for handling the scheduling of tasks.
is the execution context in which all tasks will run.
is the preferred ExecutionModel, a guideline for run-loops and producers of data. Use ExecutionModel.Default for the default.
Scheduler builder - uses monix's
default ScheduledExecutorService
for handling the scheduling of tasks.
Scheduler builder - uses monix's
default ScheduledExecutorService
for handling the scheduling of tasks.
is the execution context in which all tasks will run.
Scheduler builder that converts a Java ScheduledExecutorService
into
a scheduler.
Scheduler builder that converts a Java ScheduledExecutorService
into
a scheduler.
is the ScheduledExecutorService
that handles the
scheduling of tasks into the future. If not provided, an internal
default will be used. You can also create one with
java.util.concurrent.Executors
.
is the preferred ExecutionModel, a guideline for run-loops and producers of data. Use ExecutionModel.Default for the default.
Scheduler builder that converts a Java ScheduledExecutorService
into
a scheduler.
Scheduler builder that converts a Java ScheduledExecutorService
into
a scheduler.
is the ScheduledExecutorService
that handles the
scheduling of tasks into the future. If not provided, an internal
default will be used. You can also create one with
java.util.concurrent.Executors
.
Scheduler builder that converts a Java ScheduledExecutorService
into
a scheduler.
Scheduler builder that converts a Java ScheduledExecutorService
into
a scheduler.
is the ScheduledExecutorService
that handles the
scheduling of tasks into the future. If not provided, an internal
default will be used. You can also create one with
java.util.concurrent.Executors
.
is the UncaughtExceptionReporter that logs uncaught exceptions.
Wrap the given ExecutionContext.reportFailure
or use
UncaughtExceptionReporter.LogExceptionsToStandardErr for
the default.
is the preferred ExecutionModel, a guideline for run-loops and producers of data. Use ExecutionModel.Default for the default.
Scheduler builder that converts a Java ScheduledExecutorService
into
a scheduler.
Scheduler builder that converts a Java ScheduledExecutorService
into
a scheduler.
is the ScheduledExecutorService
that handles the
scheduling of tasks into the future. If not provided, an internal
default will be used. You can also create one with
java.util.concurrent.Executors
.
is the UncaughtExceptionReporter that logs uncaught exceptions.
Wrap the given ExecutionContext.reportFailure
or use
UncaughtExceptionReporter.LogExceptionsToStandardErr for
the default.
Scheduler builder .
Scheduler builder .
is the execution context in which all tasks will run.
Use scala.concurrent.ExecutionContext.Implicits.global
for the default.
is the UncaughtExceptionReporter that logs uncaught exceptions.
Wrap the given ExecutionContext.reportFailure
or use
UncaughtExceptionReporter.LogExceptionsToStandardErr for
the default.
is the preferred ExecutionModel, a guideline for run-loops and producers of data. Use ExecutionModel.Default for the default.
Scheduler builder.
Scheduler builder.
is the execution context in which all tasks will run.
Use scala.concurrent.ExecutionContext.Implicits.global
for the default.
is the UncaughtExceptionReporter that logs uncaught exceptions.
Wrap the given ExecutionContext.reportFailure
or use
UncaughtExceptionReporter.LogExceptionsToStandardErr for
the default.
Scheduler builder.
Scheduler builder.
is the ScheduledExecutorService
that handles the
scheduling of tasks into the future. If not provided, an internal
default will be used. You can also create one with
java.util.concurrent.Executors
.
is the execution context in which all tasks will run.
Use scala.concurrent.ExecutionContext.Implicits.global
for the default.
Scheduler builder.
Scheduler builder.
The resulting Scheduler will piggyback on top of a Java
ScheduledExecutorService
for scheduling tasks for execution with
a delay and a Scala ExecutionContext
for actually executing the
tasks.
is the ScheduledExecutorService
that handles the
scheduling of tasks into the future. If not provided, an internal
default will be used. You can also create one with
java.util.concurrent.Executors
.
is the execution context in which all tasks will run.
Use scala.concurrent.ExecutionContext.Implicits.global
for the default.
is the UncaughtExceptionReporter that logs uncaught exceptions.
Wrap the given ExecutionContext.reportFailure
or use
UncaughtExceptionReporter.LogExceptionsToStandardErr for
the default.
is the preferred ExecutionModel, a guideline for run-loops and producers of data. Use ExecutionModel.Default for the default.
Creates a Scheduler meant for computational heavy tasks.
Creates a Scheduler meant for computational heavy tasks.
Characteristics:
- backed by Scala's ForkJoinPool
for the task execution, in async mode
- uses monix's default ScheduledExecutorService
instance for scheduling
- all created threads are daemonic
- cooperates with Scala's BlockContext
is the number of threads that can run in parallel
is the UncaughtExceptionReporter that logs uncaught exceptions.
Wrap the given ExecutionContext.reportFailure
or use
UncaughtExceptionReporter.LogExceptionsToStandardErr for
the default.
is the preferred ExecutionModel, a guideline for run-loops and producers of data. Use ExecutionModel.Default for the default.
Builds a Scheduler with a fixed thread-pool.
Builds a Scheduler with a fixed thread-pool.
Characteristics:
- backed by a fixed pool ScheduledExecutorService
that takes care
of both scheduling tasks in the future and of executing immediate tasks
- does not cooperate with Scala's BlockingContext
, so tasks should not
block on the result of other tasks scheduled to run on this same thread
the created threads name prefix, for easy identification.
specifies whether the created thread should be daemonic
is the UncaughtExceptionReporter that logs uncaught exceptions.
The explicit global Scheduler
.
The explicit global Scheduler
. Invoke global
when you want to provide the global
Scheduler
explicitly.
The default Scheduler
implementation is backed by a work-stealing thread pool, along
with a single-threaded ScheduledExecutionContext
that does the scheduling. By default,
the thread pool uses a target number of worker threads equal to the number of
available processors.
the global Scheduler
Creates a Scheduler meant for blocking I/O tasks.
Creates a Scheduler meant for blocking I/O tasks.
Characteristics:
- backed by a cached ThreadPool
executor with 60 seconds of keep-alive
- the maximum number of threads is unbounded, as recommended for blocking I/O
- uses monix's default ScheduledExecutorService
instance for scheduling
- doesn't cooperate with Scala's BlockContext
because it is unbounded
the created threads name prefix, for easy identification.
specifies whether the created threads should be daemonic (non-daemonic threads are blocking the JVM process on exit).
is the UncaughtExceptionReporter that logs uncaught exceptions.
Wrap the given ExecutionContext.reportFailure
or use
UncaughtExceptionReporter.LogExceptionsToStandardErr for
the default.
is the preferred ExecutionModel, a guideline for run-loops and producers of data. Use ExecutionModel.Default for the default.
Builds a Scheduler that schedules and executes tasks on its own thread.
Builds a Scheduler that schedules and executes tasks on its own thread.
Characteristics:
- backed by a single-threaded ScheduledExecutorService
that takes care
of both scheduling tasks in the future and of executing tasks
- does not cooperate with Scala's BlockingContext
, so tasks should not
block on the result of other tasks scheduled to run on this same thread
is the name of the created thread, for easy identification
specifies whether the created thread should be daemonic (non-daemonic threads are blocking the JVM process on exit)
is the UncaughtExceptionReporter that logs uncaught exceptions.
Wrap the given ExecutionContext.reportFailure
or use
UncaughtExceptionReporter.LogExceptionsToStandardErr for
the default.
is the preferred ExecutionModel, a guideline for run-loops and producers of data. Use ExecutionModel.Default for the default.