jorgebay commented on issue #1077: Tinkerpop 2135 Fix handling of closed idle 
connections in Gremlin.Net driver
URL: https://github.com/apache/tinkerpop/pull/1077#issuecomment-469640764
 
 
   It's looking great and its a nice improvement.
   
   I have a couple of suggestions:
   - `ConcurrentDictionary.Count` is a [really expensive 
call](https://github.com/Microsoft/referencesource/blob/master/Microsoft.Bcl/System.Threading.Tasks.v1.5/System/Collections/Concurrent/ConcurrentDictionary.cs#L830):
 Can we use copy-on-write collections? I've implemented one here, if you'd like 
to reuse/adapt: 
https://github.com/datastax/csharp-driver/blob/master/src/Cassandra/Collections/CopyOnWriteList.cs
   - To ensure that concurrent modifications to the pool don't occur, e.g., 
pool growing and closing, we could use something like a ordered task scheduler. 
That way we make sure nothing is occurring on another thread that can modify 
the internal state.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to