/// <summary>
 /// Creates an ordered waiter.
 /// </summary>
 /// <param name="startPos">If startPos is &gt;= 0 then waiter starts from that position.
 /// If not something will need to hit increment |startPos| times.</param>
 public OrderedWaiter(long startPos)
 {
     _waiters     = new Heap <WaitStats>((s1, s2) => s1.Line > s2.Line);
     _currCleared = startPos;
 }
 /// <summary>
 /// Creates an ordered waiter.
 /// </summary>
 /// <param name="firstCleared">If true, then the first position (that is,
 /// position 0) will be considered already free to proceed. If not something
 /// will need to hit increment.</param>
 public OrderedWaiter(bool firstCleared = true)
 {
     _waiters     = new Heap <WaitStats>((s1, s2) => s1.Line > s2.Line);
     _currCleared = firstCleared ? 0 : -1;
 }