E
Emil Sandin
Hi, if I run this script:
loop{
puts "hello"
sleep 1
}
It outputs "hello" every second.
But if I place it in a separate thread:
Thread.new do
loop{
puts "hello"
sleep 1
}
end
it prints it only one time and then exits.
Why is that?
loop{
puts "hello"
sleep 1
}
It outputs "hello" every second.
But if I place it in a separate thread:
Thread.new do
loop{
puts "hello"
sleep 1
}
end
it prints it only one time and then exits.
Why is that?