From: Jacek Olszak Date: 2006-01-09T02:19:07+09:00 Subject: Newbie question about threads and gets Hi everyone... I've a simple question - how can I write an application with two threads, where first thread reads the user input. I want both threads to run SIMULTANEOUSLY. So .. here is my code: a=Thread.new do $stdin.gets end b=Thread.new do 5.times do print "b" $stdout.flush Thread.pass end end a.join b.join Unfortunelty "gets" block my whole application - the "b" thread waits until user writes something to the stdin. But I want the b thread not wait and run at the same time. Thanks Jacek -- Posted via http://www.ruby-forum.com/.