[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: queuing work in a web app (sinatra/webrick)
From:       Robert Gleeson <rob () flowof ! info>
Date:       2009-11-19 1:45:24
Message-ID: 8f054ace7dfa2d0f869492caee78b0d0 () ruby-forum ! com
[Download RAW message or body]

> Sure, i got this code from the Oreilly Ruby Cookbook. Is it bad code 
> then?
The book seems to be a little outdated - for example, i rarely see 
people defining setters themselves nowadays, especially when you can use 
attr_writer :pause . I'm not sure why they didn't pick up on what could 
be an infinite loop, or at least a loop that can repeat itself many, 
many times.

> Again this doesn't happen when i use similar code in Java...
I don't know why that is in Java - in C, Ruby, an infinite loop is going 
to consume a lot of CPU power unless you take precautions.

-- 
Posted via http://www.ruby-forum.com/.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic