jira-importer opened a new issue, #978:
URL: https://github.com/apache/httpcomponents-core/issues/978

   **[Matt 
Nelson](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=mattnelson)**
 opened 
**[HTTPCORE-469](https://issues.apache.org/jira/browse/HTTPCORE-469?redirect=false)**
 and commented
   
   AbstractConnPool is currently using a `ReentrantLock` which has to lock for 
read and write operations. Switching to `ReentrantReadWriteLock`[1] and read 
locks for the stats/getters methods would reduce the possibility for 
instrumentation[1] to cause contention. Another option would be 
`StampedLock`[3] if the compile target is 1.8.
   
   [1] 
https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/locks/ReentrantReadWriteLock.html
   [2] 
https://github.com/dropwizard/metrics/blob/v3.2.2/metrics-httpclient/src/main/java/com/codahale/metrics/httpclient/InstrumentedHttpClientConnectionManager.java#L63-L95
   [3] 
https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/locks/StampedLock.html
   
   
   ---
   No further details from 
[HTTPCORE-469](https://issues.apache.org/jira/browse/HTTPCORE-469?redirect=false)


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to