[Backgroundrb-devel] MiddleMan.worker blocks?

Marc Evans Marc at SoftwareHackery.Com
Wed Mar 7 16:54:50 EST 2007

On Wed, 7 Mar 2007, Mason Hale wrote:

> On 3/7/07, Marc Evans <Marc at softwarehackery.com> wrote:
>> Notice in the above the "sleep 0.001". Without that sleep, I get the
>> blocking behavior I described in the original post. With it, I get the
>> behavior I would expect, which is that I can retrieve the progress
>> reasonably quickly and repeatedly.
>> Again, any suggestions?
> That is very odd. My gut says it must have something to do with locking
> between threads.
> I've previously run into thread-related issues around the worker results
> feature, finding
> that it is unreliable. This smells like a similar problem.
> more detail:
> http://rubyforge.org/pipermail/backgroundrb-devel/2007-January/000638.html
> http://backgroundrb.devjavu.com/projects/backgroundrb/ticket/43
> My suggestion would be to store your worker state externally in a database
> or other store.
> That "sleep 0.0001" works at all is weird, and I'd be hesitant to rely on it
> continuing to work.
> Mason

Thanks again for the follow up. I have to agree with your observation. I 
have also since found that "sleep 0" removes the blocking problem, which 
further supports your assertions.

One last thing I will try, based on other feedback about ruby 1.8.5 
problems, is to try going back to 1.8.4 to see if that makes any 
difference. For reference, I am using the following:

   AMD Opteron

- Marc

More information about the Backgroundrb-devel mailing list