Subject: [Boost-bugs] [Boost C++ Libraries] #3958: ssl::stream async_read_some and async_write_some handlers never run concurrently
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-02-24 02:23:11
#3958: ssl::stream async_read_some and async_write_some handlers never run
concurrently
--------------------------------------------------------+-------------------
Reporter: L McGuinness <lorcan.mcguinness@â¦> | Owner: chris_kohlhoff
Type: Bugs | Status: new
Milestone: To Be Determined | Component: asio
Version: Boost 1.42.0 | Severity: Problem
Keywords: openssl ssl strand concurrency asio |
--------------------------------------------------------+-------------------
Handlers passed to ssl::stream::async_read_some and
ssl::stream::async_write_some are always invoked in the context of a
strand. This strand is a member of openssl_stream_service, which is
typically a process-wide instance.
The effect of this is that a time-consuming async_read_some handler on one
ssl::stream instance can block all other async_read_some and
async_write_some handlers on other instances of ssl::stream.
The code that does this is in boost/asio/ssl/detail/openssl_operation.hpp.
Line 319 performs strand::wrap on the callback to
openssl_operation::async_write_handler. At lines 367 and 373,
async_write_handler invokes the user's handler function (passed to
ssl::stream::async_write_some). This runs in the context of strand_.
The strand instance in this case is always
openssl_stream_service::strand_, as can be seen in
asio/ssl/detail/openssl_stream_service.hpp, line 395.
The situation for async_read_handler is similar.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3958> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:02 UTC