Hey Theodore,
Theodore H. Smith wrote:
I'm currently writing a console application and I'd like to be able to
get input from the user yet not have the application block if there's no
input available.
Why shouldn't it block?
Ha! That made me smile. So yeah, I understand that there are other
ways of doing things (threads, separate processes, yada yada), I was
simply asking if there was a way I could use StdIn in a nonblocking
fashion so that I didn't have to change much in the way my existing code
is working.
But, FYI, my app is a TCP server of sorts and I was looking in to
building a console version of it. Thus, without getting into threads
and such, my main Run() loop must handle user input whilst also yielding
to the main event loop of the application so that socket events can be
fired. And so, this is why the question of a nonblocking stdin call
came up.
It's no matter really, I was just curious because it seemed like quite
different behaviour from other RB streams I've dealt with (and so I
figured I might be overlooking something).
Take care,
jp
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|