Opposite of yield?
Jan Decaluwe
jan at jandecaluwe.com
Thu Sep 11 03:43:11 EDT 2003
achrist at easystreet.com wrote:
>
> 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
You may want to check out how such things are done with my MyHDL
package. The target application is hardware design, but the idea
is more probably general.
http://jandecaluwe.com/Tools/MyHDL/manual/model-obj.html
Jan
--
Jan Decaluwe - Resources bvba - http://jandecaluwe.com
Losbergenlaan 16, B-3010 Leuven, Belgium
Bored with EDA the way it is? Check this:
http://jandecaluwe.com/Tools/MyHDL/Overview.html
More information about the Python-list
mailing list