Make it easier to register coroutine handlers
ecorm opened this issue · 0 comments
ecorm commented
Provide wrappers similar to basicRpc
and basicEvent
for handlers intended to be run as coroutines. For example:
session->enroll(Topic("sensor_updated"), basicCoroEvent<float>(
[&](float value, boost::asio::yield_context yield)
{
session->call(Rpc("log_value").withArgs(value), yield);
}