interpreter limits

djw dwelch91 at comcast.net
Wed Apr 14 11:26:19 EDT 2004


Paul Rubin wrote:

> Irmen de Jong <irmen at -nospam-remove-this-xs4all.nl> writes:
> 
>>Can't you do something smart with signals, threads, alarm() and kill() ?
>>Like running the code in a worker thread, where the main thread
>>keeps track of how long it has been running and if not finished
>>within a certain time, kill() it.
> 
> 
> How do you kill a thread from another thread?  I don't know of any way
> to do that.
> 
> Maybe it's safest to run the user script in a separate process and
> communicate through a socket or through shm.  That allows using the
> normal OS features for resource limits, file protection, etc.
My exploration into threads indicated that you can't kill one thread 
from another.

-Don



More information about the Python-list mailing list