On 22/12/10 11:38, Doug Winter wrote: > […] > result = yield make_maybe_blocking_call() > […]
This looks similar to Dave Beazley's use of coroutines to implement concurrency without threading. In Dave's case, the yielded expression is a request for the scheduler to perform some action at its leisure. When the scheduler has a result it's passed back in to the coroutine using the send() method and the coroutine continues on its way until the next yield. It's described in the PDF linked from <http://www.dabeaz.com/coroutines/>. The whole thing is worth a read (I think 'mind-bogglingly impressive' sums it up quite nicely), but if you want an example then the first instance of this I can find is on slide 135 (page 68). All the best, Alex _______________________________________________ python-uk mailing list python-uk@python.org http://mail.python.org/mailman/listinfo/python-uk