Construct a new reaction by passing in a reference to the reactor that
will own it, an object to execute the its react
and late
functions
on, a list of triggers, the arguments to pass into react
and late
,
an implementation of this reaction's react
function, an optional
deadline to be observed, and an optional custom implementation of the
late
function that is invoked when logical time lags behind physical time
with a margin that exceeds the time interval denoted by the deadline.
The owner of this reaction.
The this
object for react
and late
.
The ports, actions, or timers, which, when they receive values, will trigger this reaction.
The arguments to be passed to react
and late
.
Function that gets execute when triggered and "on time."
Optional
deadline: TimeValueThe maximum amount by which logical time may lag behind
physical time when react
has been triggered and is ready to execute.
Function that gets execute when triggered and "late."
Indicates whether or not this reaction is active. A reaction become active when its container starts up, inactive when its container shuts down.
Readonly
argsThe arguments to be passed to react
and late
.
Pointer to the next reaction, used by the runtime when this reaction is staged for execution at the current logical time.
Readonly
trigsThe ports, actions, or timers, which, when they receive values, will trigger this reaction.
Return whether or not this reaction has priority over another.
Reaction to compare this reaction's priority against.
Set a deadline for this reaction. The given time value denotes the maximum
allowable amount by which logical time may lag behind physical time at the
point that this reaction is ready to execute. If this maximum lag is
exceeded, the late
function is executed instead of the react
function.
The deadline to set to this reaction.
Return whether another, newly staged reaction is equal to this one. Because reactions are just object references, no updating is necessary. Returning true just signals that the scheduler shouldn't stage it twice.
Generic base class for reactions. The type parameter
T
denotes the type of the argument list of thereact
function that that is applied to when this reaction gets triggered.Author
Marten Lohstroh marten@berkeley.edu