in reply to Re^4: Any event modules that support STDIN polling for Windows?
in thread Any event modules that support STDIN polling for Windows?

# Don't really get the mechanics behind these. Just copy and apply for now.

There's nothing complicated there. It simple detaches a thread that does nothing but read lines (blocking) from STDIN, and when it gets one, echoes it to the write end of a socket pair. The read end of that socket pair is set non-blocking, so now it can be used in select loops in the normal way.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy
  • Comment on Re^5: Any event modules that support STDIN polling for Windows?