#include <iostream>
#include <string>
void demo()
{
so_5::send< int >( a, 10 );
} );
a.
event( a, [a, &ch](
int v ) {
if( v > 0 ) {
auto converted = so_5::request_value< std::string, int >(
std::cout << v << " -> '" << converted << "'" << std::endl;
so_5::send< int >( a, v - 1 );
}
else
} );
} );
receive(
from(ch), [](
int v ) {
return std::to_string(v); } );
}
int main()
{
try
{
demo();
}
catch( const std::exception & ex )
{
std::cerr << "Error: " << ex.what() << std::endl;
}
return 0;
}