Reading without process blocking

This may have come up before. This blocks all my processes when running as
a thread under windows. Am I stuck just using Linux (which the program
actually runs under) or is there another way? I can live with just using
linux, but it is a pain, and I wanted to keep this program multi-platform?

I’ve tried using gets as well, but it behaves the same way.

Thanks,

Mark

def run
puts "-Starting Konsole Thread"
while true
sleep(4)
puts "-Konsole Crappy Mode Working"
happy = IO.select ([$stdin],nil,nil,.1)
if happy != nil then
happy = STDIN.getc
puts happy
case happy
when 105
qwkimport
puts "here I am, after qwk"
end
end
end
end

NOTICE: This e-mail and any attachment(s) may contain confidential and
proprietary information of Goss International Corporation and/or its
subsidiaries and may be legally privileged. This e-mail is intended solely
for the addressee. If you are not the addressee, dissemination, copying or
other use of this e-mail or any of its content is strictly prohibited and
may be unlawful. If you are not the intended recipient please inform the
sender immediately and destroy the e-mail and any copies. All liability for
viruses is excluded to the fullest extent permitted by law. Any views
expressed in this message are those of the individual sender. No contract
may be construed by this e-mail.

Hi,

···

At Mon, 12 Aug 2002 21:16:10 +0900, Firestone, Mark - Technical Support mark.firestone@gossgraphic.co.uk wrote:

This may have come up before. This blocks all my processes when running as
a thread under windows. Am I stuck just using Linux (which the program
actually runs under) or is there another way? I can live with just using
linux, but it is a pain, and I wanted to keep this program multi-platform?

It’s one of implementation issues under Windows. See the thread from
[ruby-talk:45948].


Nobu Nakada