I don't know details of your application, but...

What you could do is store the `FlowVar` (the object that spawn returns) for 
the thread that is waiting for stdin, wait for the FlowVar to finish for 
timeout seconds. If it finishes before timeout then use the returned value and 
re-spawn the thread (if you're continually wanting to be reading from stdin), 
if it doesn't finish then stop waiting and do whatever other tasks you need 
(the thread will continue blocking in the background until you need stdin 
again).

Does that make sense? I can give further advice if you share more about your 
code.

Reply via email to