public override bool Equals(object other) { if (other == this) { return(true); } if (!(other is MulticoreWrapper.QueueItem)) { return(false); } MulticoreWrapper.QueueItem <O> otherQueue = (MulticoreWrapper.QueueItem <O>)other; return(this.id == otherQueue.id); }
public virtual int Call() { O result = null; try { result = processor.Process(item); } catch (Exception e) { log.Warn(e); } // Hope that the consumer knows how to handle null! MulticoreWrapper.QueueItem <O> output = new MulticoreWrapper.QueueItem <O>(result, itemId); callback.Call(output, processorId); return(itemId); }
public virtual int CompareTo(MulticoreWrapper.QueueItem <O> other) { return(int.Compare(this.id, other.id)); }