joining a thread: “resource deadlock avoided”
问题 I use a c++ class that encapsulates a boost::asio::io_service . class IoService { public: static IoService& getInstance() { static IoService instance; return instance; } void start() { _ioServiceThread = std::thread(&IoService::run, this); } void stop() { _ioService.stop(); _ioServiceThread.join(); } void run() { _ioService.run(); } private: IoService(); ~IoService(); IoService(const IoService& old) = delete; IoService(const IoService&& old) = delete; IoService& operator=(const IoService& old