You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by GitBox <gi...@apache.org> on 2019/03/08 09:00:12 UTC

[GitHub] [tinkerpop] FlorianHockmann commented on a change in pull request #1077: TINKERPOP-2135/2148 Fix removal of closed connections and add round-robin scheduling

FlorianHockmann commented on a change in pull request #1077: TINKERPOP-2135/2148 Fix removal of closed connections and add round-robin scheduling
URL: https://github.com/apache/tinkerpop/pull/1077#discussion_r263706934
 
 

 ##########
 File path: gremlin-dotnet/src/Gremlin.Net/Driver/ConnectionPool.cs
 ##########
 @@ -66,42 +61,35 @@ public async Task<IConnection> GetAvailableConnectionAsync()
 
         private async Task EnsurePoolIsPopulatedAsync()
         {
-            // The pool could have been empty because of connection problems. So, we need to populate it again.
+            // The pool could have been (partially) empty because of connection problems. So, we need to populate it again.
             while (true)
             {
-                var nrOpened = Interlocked.CompareExchange(ref _nrConnections, PoolEmpty, PoolEmpty);
-                if (nrOpened >= _poolSize) break;
-                if (nrOpened != PoolPopulationInProgress)
+                if (NrConnections >= _poolSize) break;
 
 Review comment:
   Hmm, yes, kind of obvious now that you mention it.

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


With regards,
Apache Git Services