I use a c++ class that encapsulates a boost::asio::io_service.
class IoService { public: static IoService& getInstance() { static
That's the error that you get when a thread tries to join itself.
So it sounds like your problem is that you're calling the stop() method from a handler function that was invoked by the io_service.
stop()
io_service