protected void MapHandler(object o, EventArgs args) {
Channel result = (Channel)o;
Channel q = (Channel)result.State;
try {
RpcResult r = (RpcResult)result.Dequeue();
q.Enqueue(r.Result);
}
catch(Exception x) {
//Some kind of problem:
q.Enqueue(x);
}
}
public override void GenerateTree(Channel q, MapReduceArgs args) {