Fine thread control, Run only n bytecodes

Paul Rubin http
Wed Jul 21 05:32:51 CEST 2004


"David Pokorny" <davebrok at soda.csua.berkeley.edu> writes:
> I'd like to be able to take a function or other chunk of code (that someone
> else has written), run it for, say 50 byte codes, and then return control
> back to my program/controlling thread until my program/controlling thread
> indicates that it wants to run the next 50 bytes codes of the foreign
> program, etc...

This subject has come up before.  If you're trying to timeshare, I
don't think that's really going to help you.  Some bytecodes can take
unbounded amounts of time to execute.



More information about the Python-list mailing list