You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Alex (Jira)" <ji...@apache.org> on 2024/07/29 12:44:00 UTC
[jira] [Created] (HTTPCLIENT-2334) AsyncDataProducer.produce gets into a tight loop
Alex created HTTPCLIENT-2334:
--------------------------------
Summary: AsyncDataProducer.produce gets into a tight loop
Key: HTTPCLIENT-2334
URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2334
Project: HttpComponents HttpClient
Issue Type: Improvement
Components: HttpClient (async)
Affects Versions: 5.2.2
Reporter: Alex
I am using async data transfer for http request (POST) and using
AsyncDataProducer interface produce method. This method seems to be called multiple times in a tight NIO loop when it does not immediately produce data when called. In my case it needs to store the provided DataStreamChannel and return, so that DataStreamChannel can be used later when data for the request is available. However the method seems to be called again immediately in a tight loop and is causing high CPU consumption. Effectively I had to make it blocking which is not the intent of the API.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org