diff Implab/Parallels/AsyncQueue.cs @ 227:8d5de4eb9c2c v2

Reimplemented JsonXmlReader, added support for null values: JSON null values are mapped to empty nodes with 'xsi:nil' attribute set to 'true'
author cin
date Sat, 09 Sep 2017 03:53:13 +0300
parents 238e15580926
children d6fe09f5592c
line wrap: on
line diff
--- a/Implab/Parallels/AsyncQueue.cs	Fri Aug 25 02:16:35 2017 +0300
+++ b/Implab/Parallels/AsyncQueue.cs	Sat Sep 09 03:53:13 2017 +0300
@@ -385,8 +385,6 @@
             if (next == null) {
 
                 if (first != Interlocked.CompareExchange(ref m_last, null, first)) {
-                    /*while (first.next == null)
-                        Thread.MemoryBarrier();*/
 
                     // race
                     // someone already updated the tail, restore the pointer to the queue head
@@ -394,12 +392,6 @@
                 }
                 // the tail is updated
             }
-
-            // we need to update the head
-            //Interlocked.CompareExchange(ref m_first, next, first);
-            // if the head is already updated then give up
-            //return;
-
         }
 
         public void Clear() {