ok2c commented on a change in pull request #137: HTTPCORE-589 Fix LaxConnPool to ensure pending requests assigned connections URL: https://github.com/apache/httpcomponents-core/pull/137#discussion_r313913346
########## File path: httpcore5/src/main/java/org/apache/hc/core5/pool/LaxConnPool.java ########## @@ -392,17 +395,17 @@ public void shutdown(final CloseMode closeMode) { } } - private boolean allocatePoolEntry() { + private PoolEntry<T, C> createPoolEntry() { final int poolmax = max; int prev, next; do { prev = allocated.get(); next = (prev<poolmax)? prev+1 : prev; } while (!allocated.compareAndSet(prev, next)); - return prev < next; + return (prev < next)? new PoolEntry<T,C>(route, timeToLive) : null; } - private void deallocatePoolEntry() { + private void disposePoolEntry(final PoolEntry<T, C> entry) { Review comment: @coxlinton The `entry` parameter does not appear to be used and `disposePoolEntry` does not seem right given that no disposal actually takes place in this method. Can you think of a better name for this method? ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org