peer.sendWord(lf);
}
public void reset(Context ctx, int phase) {
+
+ // set this to true to get a more "fine grained" report of the shutdown process
+ boolean extratokens = false;
+
switch(phase) {
case 0: {
torpedoes.add(dock);
}
case 1: {
Context.LoopFactory lf = ctx.new LoopFactory(dock, 1);
- lf.sendToken(fleet.getShip("Debug",0).getDock("in").getDataDestination());
if (peer != null) {
for(int i=0; i<peer.getTokensToAbsorb(); i++) {
lf.recvToken();
+ if (extratokens) lf.sendToken(fleet.getShip("Debug",0).getDock("in").getDataDestination());
}
//lf.sendToken(dip_peer.dock.getInstructionDestination());
}
+ lf.sendToken(fleet.getShip("Debug",0).getDock("in").getDataDestination());
lf = lf.makeNext(0);
lf.abortLoopIfTorpedoPresent();
lf.collectWord();
}
case 2: {
reset_count++;
+ if (extratokens && peer != null) reset_count += peer.getTokensToAbsorb();
break;
}
case 3: {