boost coroutine server crashes when writting data to client
问题 I made my server based on boost coroutine echo server example, simply receives and writes back some data. It crashes when writing data to client, and more strangely, it only crashes when using mutiple cores. Here's the server, it reads 4 bytes and write back "OK", within 1 second as timeout: #include <winsock2.h> #include <windows.h> #include <iostream> using namespace std; #include <boost/thread/thread.hpp> #include <boost/asio.hpp> #include <boost/asio/spawn.hpp> using namespace boost;