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-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org

Reply via email to