Nonblocking IO for stdin
Stewart Gordon
smjg_1998 at yahoo.com
Wed Jan 10 19:08:19 PST 2007
gareis wrote:
<snip>
> The only solution I see currently is to use threads. That should be
> relatively safe, given that the input thread should never need to
> interact with the output thread. I hope.
<snip>
I think using threads is indeed the solution. I haven't tried it, but
expect that it would be perfectly safe as long as communication through
stdin, stdout and stderr is always done through only one thread.
Keeping both input and output in one thread will help to ensure that the
input and output don't become hopelessly tangled with each other in the
console window.
Stewart.
More information about the Digitalmars-d-learn
mailing list