marsqing commented on PR #405: URL: https://github.com/apache/httpcomponents-core/pull/405#issuecomment-1545021287
The synchronized in AbstractConnPool is probably the most problematic one because blocking/awaiting for available connections is so common. The most "correct" way is to replace all synchronized with lock. But as I don't have thorough understanding of the codebase, I'm afraid I won't be able to make the best choice. For example, the [synchronized](https://github.com/apache/httpcomponents-core/blob/45d8a4cb391f591bb8d380b820437b651435774f/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java#L431) in HttpAsyncService is on a State object, should I add a ReentrantLock field in State class or there are better ways? I've reviewed all synchronized in httpcomponent-core and I think they are ok or at least much less problematic than the one in AbstractConnPool. -- 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]
