[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Thread killing in Win32
- From: Daniel Quintela <danielq@...>
- Date: Tue, 25 May 2004 19:27:39 -0300
Thanks Peter, but the problem are not the "friendly" threads.
Even, if the thread is in an Alertable Wait ( WaitFor*Ex ) I can handle it
( with APC's).
I know that TerminateThread is THE extreme resort, but even Microsoft
advises against its use.
I want to develop a solution for those "third party" threads that is
difficult or not possible to recode.
Thanks again,
Daniel
----- Original Message -----
From: "Peter Loveday" <peter@eyeonline.com>
To: "Lua list" <lua@bazar2.conectiva.com.br>
Sent: Tuesday, May 25, 2004 6:49 PM
Subject: Re: Thread killing in Win32
> As far as I know the only way to kill a thread is with TerminateThread().
>
> Ideally you would arrange to send some sort of message or event to the
> thread asking it to terminate itself (via ExitThread() or returning from
> threadproc), for clean-ness. But if you can gaurrantee that the thread is
> in a safe state (ie finished and dormant) it would probably be okay to
> terminate it.
>
> Love, Light and Peace,
> - Peter Loveday
> Director of Development, eyeon Software
>
> ----- Original Message -----
> From: "Daniel Quintela" <danielq@advancedsl.com.ar>
> To: "Lua list" <lua@bazar2.conectiva.com.br>
> Sent: Wednesday, May 26, 2004 6:05 AM
> Subject: Thread killing in Win32
>
>
> > Hi,
> >
> > I'm adding a kill function to my library.
> > In *ix it uses a signal approach, but in Win32 it is not possible.
> >
> > Somebody knows like removing a win32 thread from a Non Alertable User
Mode
> > Wait ?
> >
> > Any help is welcome.
> >
> > Thanks in advance,
> >
> > Daniel
> >
> >
>