> In message "[ruby-talk:9750] Threads and I/O" > on 01/01/23, "Hal E. Fulton" <hal9000 / hypermetrics.com> writes: > > |Is there any way for the main thread to kill a thread > |that is doing, e.g., a gets? > > require 'timeout' > > str = nil > begin > timeout(5) do > str = gets > end > rescue TimeoutError > ... you have timeout ... > end > > matz. Matz (or anyone else)... This works fine (1.6.1 Win98) except that if I *start* to type a string, it never times out. (Works perfectly on Unix...) Bug, feature, or regrettable side effect of using Windows? Hal