From: "Michael W. Ryder" <_mwryder@...> Date: 2006-12-18T08:55:10+09:00 Subject: Question regarding threads and I/O I am a veteran programmer but still am trying to learn Ruby. In the language I have been using for over 25 years input has an option to terminate after x number of seconds, something that seems to be missing in Ruby. I use this ability to log off sessions when the user leaves the computer for a time along with other purposes. Is it possible in Ruby to use two threads for input, one for reading from the selected source and the second that would terminate the first thread if it hadn't completed in the specified amount of time? The main program would start the first thread and feed the PID to the second thread along with the number of seconds, or milliseconds, to sleep. The second thread would then see if the first thread is still alive when it wakes up and if so terminate it. Either way the second thread would exit after the number of seconds given.