protected void ReduceHandler(object o, EventArgs args) {
Channel result = (Channel)o;
Channel q = (Channel)result.State;
try {
RpcResult r = (RpcResult)result.Dequeue();
//The result should be a list:
IList l = (IList)r.Result;
q.Enqueue(new Pair<object, bool>(l[0], (bool)l[1]));
}
catch(Exception x) {
q.Enqueue(x);
}
}
}