protected void HandleReduce(object q, EventArgs args) {
object result;
Channel red_res = (Channel)q;
try {
object red_o = red_res.Dequeue();
if( red_o is Exception ) {
result = red_o;
}
else {
var pres = (Pair<object, bool>)red_o;
result = new object[]{pres.First, pres.Second};
}
}
catch(Exception x) {
result = x;
}
_rpc.SendResult(red_res.State, result);
}
protected void HandleTree(object q, EventArgs args) {