When a boost::asio::yield_context is used with the async receive/send functions there seems to be threading issues where after the function calls the thread that called the async function call is not the same one that was used to launch the async function.
This causes threading issues where after the async function calls the same thread that launched the async functions are not the same thread after the async function finishes causing race conditions.
will not work since when the completion handlers of the async functions are called there is no guarantee that the executor that is assigned the the completion handler is the same one which was used to create to completion handler. The REQUIRE(strand.running_in_this_thread()); before the async function call works but fails after the async function call.
When a boost::asio::yield_context is used with the async receive/send functions there seems to be threading issues where after the function calls the thread that called the async function call is not the same one that was used to launch the async function. This causes threading issues where after the async function calls the same thread that launched the async functions are not the same thread after the async function finishes causing race conditions.
Running something like below
will not work since when the completion handlers of the async functions are called there is no guarantee that the executor that is assigned the the completion handler is the same one which was used to create to completion handler. The
REQUIRE(strand.running_in_this_thread());
before the async function call works but fails after the async function call.