You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (JIRA)" <ji...@apache.org> on 2017/08/20 14:35:02 UTC

[jira] [Resolved] (HTTPCORE-469) Use ReentrantReadWriteLock in AbstractConnPool

     [ https://issues.apache.org/jira/browse/HTTPCORE-469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCORE-469.
----------------------------------------
       Resolution: Won't Fix
    Fix Version/s:     (was: Future)

Obsoleted by HTTPCORE-390

Oleg

> Use ReentrantReadWriteLock in AbstractConnPool
> ----------------------------------------------
>
>                 Key: HTTPCORE-469
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-469
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>          Components: HttpCore
>            Reporter: Matt Nelson
>            Assignee: Oleg Kalnichevski
>            Priority: Minor
>              Labels: stuck, volunteers-wanted
>
> 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



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org