Warning: session_start(): open(/var/lib/php/sessions/sess_b1r0ff2ocrn7l9b6qpbgapl90t, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
// goes well with the stage {} macro (see tok_stages)
srecord Stages2(L stages) is Steppable, Runnable {
int iStage;
Stage stage;
// set this to record timing for each stage
settable FunctionTimings timings;
{ stages = new L; }
record noeq Stage(S name, Runnable body) {
run {
if (timings != null)
timings.do(name, body);
else
callF(body);
}
}
public bool step() {
// What is this funny syntax
if (iStage >= l(stages)) false;
stages.get(iStage++).run();
true;
}
Stage stage(Stage stage) {
stages.add(stage);
ret stage;
}
Stage stage(S name, Runnable body) {
ret stage(new Stage(name, body));
}
run { stepAll(this); }
int indexOfStage(Stage stage) {
ret stages.indexOf(stage);
}
void stepUntilStage(Stage stage) {
int index = indexOfStage(stage);
while (iStage <= index && step()) {}
}
}