🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #12372

Re: Killing off a crashed thread

#12372
From: Remy Lebeau (TeamB)
Date: Thu, 04 Dec 2003 22:21
19 lines
1826 bytes
"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: <3fcfb2c1$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!newshosting.com!news-xfer2.atl.newshosting.com!yellow.newsread.com!netaxs.com!newsread.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3fcf0500$1@newsgroups.borland.com> <3fcf7af5$1@newsgroups.borland.com> <3fcfb097@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: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3fcf0500$1@newsgroups.borland.com> <3fcf7af5$1@newsgroups.borland.com> <3fcfb097@newsgroups.borland.com>
Subject: Re: Killing off a crashed thread
Date: Thu, 4 Dec 2003 14:21:25 -0800
Lines: 21
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: 67.23.78.224
Message-ID: <3fcfb2c1$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1070576321 67.23.78.224 (4 Dec 2003 14:18:41 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!yellow.newsread.com!netaxs.com!newsread.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail