public bool Add(STMObject stmObject, ICloneable snapshot) { // overflow? if (next == size) { Pair[] newItems = new Pair[2 * size]; items.CopyTo(newItems, 0); items = newItems; size = 2 * size; } items[next++] = new Pair(stmObject, snapshot); return(true); }
public Pair(STMObject stmObject, ICloneable snapshot) { this.stmObject = stmObject; this.snapshot = snapshot; }
public TList(int v) { readCache = Thread.AllocateDataSlot(); writeCache = Thread.AllocateDataSlot(); stmObject = new STMObject(new Foo(v), readCache, writeCache); }