On 22 February 2013 13:04, Andrew Robinson <[email protected]> wrote: > > How would you get an interpreter thread to check for a shutdown request > every N cycles? > I've read about how to set a timeout based on time, but not on any kind of > cycle (eg: instruction cycle?) count. > > Do you have a python example?
while True:
for n in range(N):
if process_cycle() == END:
return
if shutdown():
raise ShutDownError
Oscar
--
http://mail.python.org/mailman/listinfo/python-list
