On 20/02/2008, bob gailer <[EMAIL PROTECTED]> wrote:
> Tony Cappellini wrote:
> > On Feb 19, 2008 2:02 PM, bob gailer <[EMAIL PROTECTED]> wrote:
> >
> >> Tony Cappellini wrote:
> >>
> >>> When I executing a program external to the main program in a thread,
> >>> and that thread hangs, can the thread be terminated?
> >>>
> >>>
> >> Please define "hangs".
> >>
> >
> >
> >> AFAIK that could mean waiting on an external event / signal /
> >> communication that never happens, or running in an "infinite loop". So
> >> which is it or is it something else?
> >>
> >
> > Never happens.
> >
>
> Sorry. I don't understand that, so I can't help. Perhaps someone else can.

I presume he means he defines "hangs" as "waiting on an external event
/ signal / communicaiton that never happens".

AFAIK, there's no good way to kill a thread (google for 'python kill
thread' for lots of hits).  IME most blocking operations have optional
timeout parameters, so you could restructure your main thread loop to
wait->work/timeout->repeat, which should make it easier to end the
thread.

-- 
John.
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to