An abstract scheduler that always dedicates a thread to a reactor.
A Scheduler
that reuses the target Java Executor
.
A Scheduler
that reuses the target Java Executor
.
It checks if the specified executor is a ForkJoinPool
that uses
ReactorForkJoinWorkerThread
and, if so, applies additional optimizations:
schedule
is called from a ForkJoinWorkerThread
that belongs to the
ForkJoinPool
that is the executor
, then a more lightweight mechanism is
used to schedule the task.unschedule
. This will attempt to
remove submitted tasks from the ForkJoinPool
a certain of times and execute
them directly. The scheduler.default.unschedule-count
bundle configuration
key is the maximum number of attempts. If removing is not successful,
this immediately stops.ReactorForkJoinWorkerThread
has an associated mini-queue into which it
stores at most one scheduled Frame
. Any frame must first be in the mini-queue
before getting converted into a task and sent to the queue. Before any such
worker thread returns control to the pool, it must flush its mini-queue.
Simultaneously, there is a reanimator thread that periodically traverses the
mini-queues of all the threads, and flushes them if necessary.
Superclass for the information objects that a scheduler attaches to a reactor frame.
Executes the reactor on the timer thread.
Executes the reactor on the timer thread.
The reactor is run every period
milliseconds.
This is regardless of the number of events in this reactor's event queue.
When the reactor runs, it flushes as many events as there are initially pending events.
Contains utility classes and implementations of the dedicated scheduler.
Default reactor scheduler.
Default fork/join pool instance used by the default scheduler.
The default handler prints the exception to the standard error stream.
Scheduler that shares the global Scala execution context.
A scheduler that always starts a reactor on a dedicated thread.
A scheduler that reuses (piggybacks) the current thread to run the reactor.
A scheduler that reuses (piggybacks) the current thread to run the reactor.
Until the reactor terminates, the current thread is blocked and cannot be used any more. This scheduler cannot be used to start reactors from within another reactor, and is typically used to turn the application main thread into a reactor.
org.reactors.Scheduler.Dedicated.Piggyback
Silent handler ignores exceptions.
Companion object for creating standard reactor schedulers.