Hi Emile,
I am trying to create a multithreaded caller/callee applications with the remote procedure returning a deferred outcome (to simulate a time consuming operation). Basiaclly the callee enrolls to provide a procedure, and the caller calls that procedure from 5 threads every 20 seconds. The caller application crashes after several minutes with the following error:
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::current_exception_std_exception_wrapper<std::runtime_error> >'
here is a snippet of the core:
(gdb) up
#11 0x0808dc92 in boost::asio::detail::coro_handler<boost::asio::detail::wrapped_handler<boost::asio::io_service::strand, void (*)(), boost::asio::detail::is_continuation_if_running>, wamp::AsyncResult<wamp::Result> >::operator() (
this=0xb1a01260, value=...)
at /usr/local/include/boost/asio/impl/spawn.hpp:53
53 (*coro_)();
(gdb) up
#12 0x0808750e in std::_Function_handler<void (wamp::AsyncResult<wamp::Result>), boost::asio::detail::coro_handler<boost::asio::detail::wrapped_handler<boost::asio::io_service::strand, void (*)(), boost::asio::detail::is_continuation_if_running>, wamp::AsyncResult<wamp::Result> > >::_M_invoke(std::_Any_data const&, wamp::AsyncResult<wamp::Result>) (__functor=..., __args#0=...)
at /usr/include/c++/4.8/functional:2071
2071 (*_Base::_M_get_pointer(__functor))(
(gdb)
I am attaching both applications. Please let me know if there is a problem with my implementation.
Thanks,
Rosa