Opposite of yield?

achrist at easystreet.com achrist at easystreet.com
Wed Sep 10 23:20:57 CEST 2003


Peter Hansen wrote:
> 
> 
> Queue.Queue.get() ...
> 

That looks good.  But that needs a thread to block, right? 
A generator manages to run without being a thread (at least
overtly).  If we have the suck() statement, we also need 
something that's the opposite of a generator (a Sucker?)
and something that's the opposite of an iterator (a Suckee?). 
I'm starting to get an idea why this is completely not all
there. 

The main question this raises is "How lightweight are threads?"
Can I program with dozens or hundreds of python threads in a
program (for example under Windows) and not notice that this is
an inefficient or inept coding style?


Al




More information about the Python-list mailing list