Does Threading work properly?

K

kingsley

Hi

When I do this:

thr3 = Thread.new() do
loop do
puts \"thread\"
end
end

The loop only lasts for about 5 seconds - printing out \'thread\' about
100 times

what I want is an infinite loop - like this, which works (except I want
my infinite loop to be contained within a thread)

loop do
puts \"works\"
end

Please help

Thanks
Kingsley
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top