<div class="gmail_quote">On Wed, Oct 26, 2011 at 11:08 AM, Jason Rennie <span dir="ltr"><<a href="mailto:jrennie@gmail.com">jrennie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">First off, have you read <a href="http://jcalderone.livejournal.com/24285.html" target="_blank">http://jcalderone.livejournal.com/24285.html</a> ?<br>
If not, do. Take note of the line<br>
<br>
work = (callable(elem, *args, **named) for elem in iterable)<br>
<br>
work is a generator. Make sure you understand every line of that code :-)<br></blockquote><div><br></div></div><div>I don't see anything in task.Cooperator to limit the # of simultaneously-running tasks. Am I missing something? I guess, technically, could write my own scheduler that limits the # of simultaneously-running tasks. But, then task.Cooperator isn't really doing anything useful for me.</div>
</div></blockquote><div><br></div><div>Sorry, I didn't realize that the Cooperators were all being given a reference to the same generator. That's a useful pattern.</div><div><br></div><div>Jason</div><div><br></div>
</div>