break out boost coroutines async_send
async_send is a method that was attempted to be shared between coroutine
and non-coroutine cases. Unfortunately to have this code sharing
requires a very expensive template, boost::asio::initiate. While this
template is great for generalizing, it results in a template
instantiation per call site, which doesn't scale well at build time in
things like bmcweb, where we have 400+ async_method_call sites.
This commit breaks out async_send into async_send and async_send_yield,
which allows using concrete callback and return types, thus avoiding
the multiple template instantiations.
Tested: ClangBuildAnalyzer shows that this template is no longer one of
the longest to instantiate.
Change-Id: Ic8f226e5be71f05c5f5dcb73eb51e6094dc704eb
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/example/asio-example.cpp b/example/asio-example.cpp
index 145e87a..f7f0522 100644
--- a/example/asio-example.cpp
+++ b/example/asio-example.cpp
@@ -108,7 +108,7 @@
std::vector<uint8_t> commandData = {4, 3, 2, 1};
method.append(netFn, lun, cmd, commandData, options);
boost::system::error_code ec;
- sdbusplus::message_t reply = conn->async_send(method, yield[ec]);
+ sdbusplus::message_t reply = conn->async_send_yield(method, yield[ec]);
std::tuple<uint8_t, uint8_t, uint8_t, uint8_t, std::vector<uint8_t>>
tupleOut;
try