Wheeler, Richard wrote:
> Why not parse the python code fragments before executing them and insert a
> check for a stop event in the beginning of each loop.  It could even force a
> loop counter of some type that would allow the main thread to force the
> worker thread to stop processing through a stop event once a threshold has
> been reached.

This recipe might be of use: 
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496746

I don't believe it is threadsafe, but I'm not sure.  I think it needs to 
run the code in the main thread, then puts an alarm in a subthread that 
interrupts the main thread if it takes too long.  I don't think other 
threads can be interrupted that way.



All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to