Similar to the TerminateProcess function in win32api, there is the
TerminateThread function which you can use if you know the handle of the
thread, but it seems that you can only get the thread handle if you are
calling from that thread, or if you were the one who created it (and saved
the retu
Thanks Michael.
On Feb 19, 2008 11:23 PM, Michael Langford <[EMAIL PROTECTED]> wrote:
> Instead of using a thread, you could see if you could use a second
> process. For instance, the following would work on windows (and is
> killable).
>
> import subprocess
> import win32api
>
> class SpawnCont
Instead of using a thread, you could see if you could use a second
process. For instance, the following would work on windows (and is
killable).
import subprocess
import win32api
class SpawnController(object):
def __init__(self,cmd):
self.cmdline = cmd
def start(self):
se
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 threa
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".
>
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 "infini
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 even
When I executing a program external to the main program in a thread,
and that thread hangs, can the thread be terminated?
How does one handle this situation?
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor