Time windows of reactions are assigned as follows:
In particular, the start action of a program gets as baseline the time instant when program execution begins.
When a message without time constraints is sent (i.e., an plain action is called) from a method with current baseline bl and deadline dl, the reaction to the message inherits both bl and dl.
The rule in the previous item can be changed by explicit program constructs:
The expression after t act sets the effective baseline for act to the current baseline plus t.
The expression before t act sets the effective deadline for act to its effective baseline plust.
Special case: if the baseline denoted by an after construct is an already passed time instant, the effective baseline of the reaction is rounded off to the actual time of the call.
I'm trying to understand what constitutes an RTS and how a Timber
program translated into C is actually executed. So, I'm reading the
RTS implementations' code.
In rtsARM/rts.c, in ASYNC implementation, lines 439-442 we can see the
following code:
if (LESS(m->baseline, now)) {
m->baseline = now;
// debug("^");
}
Same code is present in ASYNC implementation in rtsPOSIX/rts.c, lines 354-355
That means that if the absolute time value for the baseline for the
action to be scheduled is in the past, we set the baseline to the
current time. However, since all the time calculations are relative to
the baseline, that would mean that all the following actions to be
scheduled from the one being scheduled at the moment would "drift". Is
this an intended behavior? I'm not sure that's the right decision.
Ivan
_______________________________________________
Timber mailing list
Timber@haskell.org
http://www.haskell.org/mailman/listinfo/timber