Article View: borland.public.cppbuilder.nativeapi
Article #12373Re: Killing off a crashed thread
From: Rodolfo Frino
Date: Thu, 04 Dec 2003 22:22
Date: Thu, 04 Dec 2003 22:22
29 lines
2042 bytes
2042 bytes
Good point. Rodolfo "Remy Lebeau (TeamB)" <gambit47.no.spam@no.spam.yahoo.com> wrote in message news:3fcfb2c1$1@newsgroups.borland.com... > > "Rodolfo Frino" <MenInBlack@nowhere.com> wrote in message > news:3fcfb097@newsgroups.borland.com... > > What about the Win32 API's ExitThread() > > You cannot call that from outside of the thread you wish to terminate. It > can only be called from the thread that is actually terminating, as it > manipulates the calling thread. If the desired thread is frozen, or you > have to abort it prematurely, you can't call ExitThread() correctly. > > > and CloseHandle() to ensure the that the thread object is removed from the > operating system. > > Of course you always have to close the thread handle when you are done with > it. But that does not apply to the situation of terminating the thread in > the first place. > > > Gambit > >
Technical Details
Message-ID:
<3fcfb399$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-09!supernews.com!easynet-quince!easynet.net!colt.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fcf0500$1@newsgroups.borland.com> <3fcf7af5$1@newsgroups.borland.com> <3fcfb097@newsgroups.borland.com> <3fcfb2c1$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,f3d1051f853af8a9 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-12-04 14:39:57 PST From: "Rodolfo Frino" <MenInBlack@nowhere.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3fcf0500$1@newsgroups.borland.com> <3fcf7af5$1@newsgroups.borland.com> <3fcfb097@newsgroups.borland.com> <3fcfb2c1$1@newsgroups.borland.com> Subject: Re: Killing off a crashed thread Date: Fri, 5 Dec 2003 09:22:37 +1100 Lines: 31 Organization: Men In Black X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 203.206.16.193 Message-ID: <3fcfb399$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1070576537 203.206.16.193 (4 Dec 2003 14:22:17 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-09!supernews.com!easynet-quince!easynet.net!colt.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail