I am trying to use Boost.Asio's object_handle
to wait for input from the console:
int main()
{
using namespace boost::asio;
io_service io;
windows::object_handle in(io);
in.assign(::GetStdHandle(STD_INPUT_HANDLE));
in.wait();
io.run();
return 0;
}
This works if I run it from the terminal, but when I try to debug into it with Visual Studio it skips wait()
. What's going on?