Scheduler

abstract class Scheduler : SupportsAdd

An object that handles the various actions related to running Tasks.

Documentation in this class is intended for implementers (people creating custom Schedulers).

If you're just looking to use the library, check out the FastScheduler documentation.

Inheritors

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Whether the scheduler may throw an exception for double acquires.

Link copied to clipboard

Whether the scheduler may throw an exception for double frees.

Link copied to clipboard

Whether the scheduler may throw an exception for double finalizations.

Link copied to clipboard
Link copied to clipboard
val tasks: <Error class: unknown class>

Functions

Link copied to clipboard
open override fun <T : ITask<*>> add(task: T): T

Adds an ITask to this scheduler.

Link copied to clipboard
fun addAll(vararg tasks: ITask<*>)
Link copied to clipboard
inline fun Scheduler.build(block: SequenceBuilder.() -> Unit)
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open fun getCurrentEvaluation(): ITask<*>?

Retrieve the current "open evaluations" - the last task to start running user code (ITask.onStart, ITask.onTick, ITask.onFinish) in this context.

Link copied to clipboard
abstract fun getLockOwner(lock: Lock): ITask<*>?

Returns the current owner of a Lock, or null if there is no current owner (i.e. it is released.)

Link copied to clipboard
open fun getOpenEvaluations(): List<ITask<*>>

Retrieve the list of "open evaluations" - a "mini call stack" containing the stack of tasks that are actively running user code (ITask.onStart, ITask.onTick, ITask.onFinish)

Link copied to clipboard
abstract fun getTickCount(): Int
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open fun refresh(task: ITask<*>)

Tries to start this Task if it is startable.

Link copied to clipboard
abstract fun register(task: ITask<*>): Int

Add the provided task to this Scheduler and assigns an ID. This is the second phase of registration, the first phase being ITask.register.

Link copied to clipboard
open fun resurvey(task: ITask<*>)

Hints to schedulers that dependencies for this task have changed.

Link copied to clipboard
abstract fun runTaskFinalizers(task: ITask<*>)

Clean up after the provided task has finished. The task should have already been moved to one of the finish states (ITask.State.Finished or ITask.State.Cancelled) before this method is called.

Link copied to clipboard
abstract fun tick()