jorgebay commented on a change in pull request #1016: WIP: Add request 
pipelining and ConnectionPool sizes TINKERPOP-1775 and TINKERPOP-1774
URL: https://github.com/apache/tinkerpop/pull/1016#discussion_r242931978
 
 

 ##########
 File path: gremlin-dotnet/src/Gremlin.Net/Driver/Connection.cs
 ##########
 @@ -154,6 +156,38 @@ private string SaslArgument()
             return Convert.ToBase64String(authBytes);
         }
 
+        private void SendNextMessage()
+        {
+            if (Interlocked.CompareExchange(ref _writeInProgress, 1, 0) != 0)
+                return;
+            if (_writeQueue.TryDequeue(out var msg))
 
 Review comment:
   I think this loop (recursion) should be extracted out of this method, 
otherwise the first time the CAS will occur but the following sendings will 
never win the CAS op (`_writeInProgress` will already be `1`) .

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to