ok2c commented on a change in pull request #277:
URL: 
https://github.com/apache/httpcomponents-core/pull/277#discussion_r605208453



##########
File path: httpcore5/src/main/java/org/apache/hc/core5/pool/LaxConnPool.java
##########
@@ -466,7 +469,20 @@ private void removeLeased(final PoolEntry<T, C> entry) {
                 final Timeout requestTimeout,
                 final FutureCallback<PoolEntry<T, C>> callback) {
             Asserts.check(!terminated.get(), "Connection pool shut down");
-            final BasicFuture<PoolEntry<T, C>> future = new 
BasicFuture<>(callback);
+            final BasicFuture<PoolEntry<T, C>> future = new 
BasicFuture<PoolEntry<T, C>>(callback) {
+
+                @Override
+                public synchronized PoolEntry<T, C> get(

Review comment:
       @carterkozak Of course, concurrent calls to `Future#get` are allowed. 
However the`#get` method would almost immediately return if the future is 
complete or release the lock by calling `Object#wait`. I do not think there is 
a problem here.




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



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

Reply via email to