You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by GitBox <gi...@apache.org> on 2019/02/22 19:22:32 UTC
[GitHub] rhernandez35 opened a new pull request #111: Add a thread-safe
capacity channel to AbstractHttp1StreamDuplexer
rhernandez35 opened a new pull request #111: Add a thread-safe capacity channel to AbstractHttp1StreamDuplexer
URL: https://github.com/apache/httpcomponents-core/pull/111
This solves two issues:
1. A data consumer that retains a reference to an old capacity channel
will no longer be able to modify state for future requests occurring on
the same connection (e.g. updating the window or requesting reads).
2. Coupling changes to the input window with changes to the io session
state prevents a race condition occuring when a consumer asynchronously
calls CapacityChannel#udpate at the same moment the input window is
exhausted by new input. Without synchronization, it was possible (albeit
unlikely) for the IO thread to decrease the window below zero, a
consumer thread to request input by calling CapacityChannel#update, then
the IO thread to clear the read request.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org