TwoVersionScheduler

rescala.scheduler.Twoversion.TwoVersionScheduler

Implementation of the turn handling defined in the Engine trait

Type parameters

Tx

Transaction type used by the scheduler

Attributes

Graph
Supertypes
trait SchedulerImpl[State, Tx]
trait Scheduler[State]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Abstract methods

protected def makeTransaction(priorTx: Option[Tx]): Tx

Concrete methods

override def forceNewTransaction[R](initialWrites: Set[of[State]], admissionPhase: (AdmissionTicket[State]) => R): R

goes through the whole turn lifecycle

goes through the whole turn lifecycle

  • create a new turn and put it on the stack
  • run the lock phase
  • the turn knows which reactives will be affected and can do something before anything is really done
    • run the admission phase
  • executes the user defined admission code
    • run the propagation phase
  • calculate the actual new value of the reactive graph
    • run the commit phase
  • do cleanups on the reactives, make values permanent and so on, the turn is still valid during this phase
    • run the observer phase
  • run registered observers, the turn is no longer valid but the locks are still held.
    • run the release phase
  • this must always run, even in the case that something above fails. it should do cleanup and free any locks to avoid starvation.
    • run the party! phase
  • not yet implemented

Attributes

Definition Classes

Inherited methods

final def forceNewTransaction[R](initialWrites: of[State]*)(admissionPhase: (AdmissionTicket[State]) => R): R

Attributes

Inherited from:
Scheduler
final override def maybeTransaction: Option[Transaction[State]]

Attributes

Definition Classes
Inherited from:
SchedulerImpl

Name of the scheduler, used for helpful error messages.

Name of the scheduler, used for helpful error messages.

Attributes

Inherited from:
Scheduler
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Scheduler -> Any
Inherited from:
Scheduler

Inherited fields

final protected val _currentTransaction: DynamicVariable[Option[Tx]]

Attributes

Inherited from:
SchedulerImpl