|MKSM|
9/5/2006 2:21:00 AM
Hello,
I was doing a quick test with Threads in my Win32 box and something
strange occured. The point here is to input text without interrupting
the counter. I plan to use a similar method to display text incoming
from a server while being able to send messages and such. A couple of
people told me that it works ok on *nix, but I can't get it to work
here.
The code:
t1 = Thread.new {
x=0
loop do
puts x
x+=1
sleep(1)
end
}
t2 = Thread.new {
loop do
y = gets.chomp
puts y
end
}
t1.join
t2.join
Regards,
Ricardo Amorim