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