> Does anyone have any suggestions for how this could be achieved? You'll have to adjust Python/ceval.c. Look for _Py_Ticker, which provides some fairness for Python threads (releasing the GIL after _Py_CheckInterval instructions). If you decrement another global variable there, you can determine that the limit has been reached, and raise an exception (say).
Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list