Exemplo n.º 1
0
 private void Insert(SListNode node)
 {
     bool success;
     do
     {
         node.Next = _headNode;
         success = Interlocked.CompareExchange(ref _headNode, node, node.Next) == node.Next;
     } while (!success);
 }
Exemplo n.º 2
0
 public SList()
 {
     var tail = new SListNode();
     tail.Next = tail;
     _headNode = tail;
 }