Recently I tried to write an asynchronous command line interface for my
program. I used posix::stream_descriptor with STDIN_FILENO assigned as data
source. Eventually, when I try to async_read_until from this stream, if I
simultaneously write to std::cout after some time I get EAGAIN error.
I wrote a small example that demonstrates this problem:
I'm using gcc 4.7.3, boost ver 1.49.
Any suggestions why it happens and how to fix it?