🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: TThread & CloseHandle

#5621
From: Remy Lebeau (TeamB)
Date: Thu, 04 Aug 2005 17:11
21 lines
1635 bytes
"Tassilo J. Klein" <nospamTJKlein@web.de> wrote in message
news:dctdlr$6gr$02$1@news.t-online.com...

> Invocation of CloseHandle function out of any reason then calls the
> destructor of the calling TThread ~DownloadThread()

The only way that could be happening is if CloseHandle() is throwing an
exception that is terminating the thread, and if you have the thread set to
FreeOnTerminate=true (or external code that is 'delete'ing the thread after
a call to WaitFor()).

> although CloseHandle is encapsulated by try/catch blocks.

That does not necessarily mean that the try..catch will actually catch an
exception.  It depends on what your catch block is actually looking for, and
what kind of exception, if any, is actualy being thrown.  What does the
actual code look like?


Gambit
Technical Details
Message-ID: <42f24cfe$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <dctdlr$6gr$02$1@news.t-online.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,185dcaeb91f025d5
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <dctdlr$6gr$02$1@news.t-online.com>
Subject: Re: TThread & CloseHandle
Date: Thu, 4 Aug 2005 10:11:39 -0700
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <42f24cfe$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1123175678 68.69.17.41 (4 Aug 2005 10:14:38 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail