Keyboard input

Well the collect() method would be running on the main thread, my question wasnt’ really about if the gets method would block, since yeah that woudln’t matter if it blocked if it was in another thread, but if the collect method blocks or not.



----- Original Message -----
From: Terje Elde
Date: Tue, 4 Jun 2002 20:44:37 +0200
To: Matthew Shapiro
Subject: Re: keyboard input

On Wed, Jun 05, 2002 at 03:34:40AM +0900, Matthew Shapiro wrote:

Hi. I just read about ruby yesterday after obtaining a copy of April 2002 linux magazine, and I’m quite impressed at how much like c++ it is, but easier. However a project that I may do in ruby instead of c++ (a software 3d api) will be useless unless I can get keyboard input in a non-blocking way. One thing that I have been thinking was using multithreading (which looks amazingly easy in ruby) and use the .collect() function, but does this block? Also will it pick up keys like the up arrow?

Just trying to understand your situation… If you’re running keyboard input
in a thread for itself, does it really matter if it blocks?



Sign-up for your own FREE Personalized E-mail at
Free email accounts with | Log in here or register today