En Mon, 25 Aug 2008 05:00:07 -0300, BlueBird <[EMAIL PROTECTED]> escribi�:
On Aug 24, 8:35 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:

        The only safe way to "abort" a thread is by having it exit on its
own. This means one needs a means of setting an attribute that each
thread periodically checks within a while loop.


Unfortunately, this does not map very well with my program. Each of my
threads are calling foreign code (still written in python though),
which might be busy for 1 to 10 minutes with its own job.

I wanted something to easily interrupt every thread to prevent my
program to stall for 10 minutes if I want to stop it (getting tired of
killing python all the time).

If the foreign Python code is running on your own process, can't you make it check a flag periodically? If it runs as another process, killing it is a lot safer than killing a thread.

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to