From: William Morgan Date: 2005-02-16T07:56:48+09:00 Subject: Re: [bug?] curses + threads = non-blocking getch Excerpts from Tanaka Akira's mail of 15 Feb 2005 (EST): > It is not a non-blocking I/O. It checks an available input before > reading. It can be re-implemented as follows: > > require "curses" > > class Curses::Window > def getch_nodelay > if IO.select([STDIN], nil, nil, 0) > getch > else > -1 > end > end > end Thank you, that works. I think it's a little surprising that the behavior of getch is different depending on whether there are threads or not, even if they've been created elsewhere in the program / libraries. But if you don't consider that a bug, that's fine. Thanks for your help. -- William