public QueueEntry(PartyType from, int line, Operation.Operation op, NumericArray result) { this.from = from; this.line = line; this.op = op; this.result = result; }
public void addOperation(Operation.Operation resource) { Operation.Operation[] temp = new Operation.Operation[++OperationCount]; if (Operations != null) { Operations.CopyTo(temp, 0); } temp[temp.Length - 1] = resource; Operations = temp; }
// pass a "receive" resuest to dispatcher, // when the message is received, the operation will be called to cuntinue the execution public void ReceiveFrom(PartyType from, int index, Operation.Operation op, NumericArray result) { dispatcher.Add(from, index, op, result); }
public void Add(PartyType from, int index, Operation.Operation op, NumericArray result) { queue.Enqueue(new QueueEntry(from, index, op, result)); }