id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 13337,io_service::stop() behavior on MSVC contradicts documentation,Diego Barrios Romero ,chris_kohlhoff,"The io_service::stop() documentation says: > [...] All invocations of this run() or run_one() member functions should return as soon as possible [...] This is the behavior observed on GCC but not on MSVC. Reproducer code: {{{ #!cpp #include #include #include using namespace std::chrono_literals; int main() { boost::asio::io_service s; s.post([] { std::this_thread::sleep_for(5ms); std::cout << ""1\n""; }); s.post([] { std::this_thread::sleep_for(5ms); std::cout << ""2\n""; }); s.post([] { std::this_thread::sleep_for(5ms); std::cout << ""3\n""; }); std::thread th([&] { s.run(); }); std::this_thread::sleep_for(1ms); s.stop(); th.join(); } }}} This prints ""1"" on [https://wandbox.org/permlink/N02wy78yFGX1eJRl GCC] but ""1 2 3"" on [http://rextester.com/FHNW43260 MSVC] This bug was concretized by an Stack Overflow user while he investigated #13317. See [https://stackoverflow.com/a/47733861/4999407 his answer] for more information.",Bugs,new,To Be Determined,asio,Boost 1.63.0,Problem,,,