<div>I implemented a <a href="http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes" target="_blank">Sieve of Eratosthenes</a> primes algorithm using generators:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">


<div><a href="http://gist.github.com/309109" target="_blank">http://gist.github.com/309109</a></div></blockquote><div><br></div><div>This code which chains together 500 generators works fine (~1/20th of a second) on my laptop. The code which chaines 501 generators (s/498/499/ on line 23) doesn't seem to finish.</div>


<div><br></div><div>Does anyone know the reason for this, or can anyone point me where to look for a good explanation?</div><div><br></div><div>Cheers,</div><div>Andrey</div>