🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.tools.owl
Article #65

Error [Thread]: destroyed before Exit()

#65
From: Prianggada I Tanaya
Date: Tue, 19 Aug 1997 00:00
55 lines
1909 bytes
-- Dear OWLers

I am working with BC4.52 on NT4.0.
I derived a class from TThread, and when the application exit,
I get an error message like this.

Error [Thread]: destroyed before Exit()

Here is the class where the error appear.

class TSCThread : public TThread {
   unsigned long Run ();
  TSC* m_pSC;
public:
   TSCThread (const TSC& sc) ;
   ~TSCThread ();
};

TSCThread::TSCThread (const TSC& sc) : TThread()
{
   m_pSC = (TSC*)≻
   Start();
   SetPriority(THREAD_PRIORITY_BELOW_NORMAL);
}

TSCThread::~TSCThread ()
{
   TerminateAndWait(500);   // << debug here ! >>
}

class TSC {
friend TSCThread;
.....
};

I debug << debug here ! >> and immediately it sends
the error message.

I don't have any clue, how could I solve this.
Are there any of you who could share some experience.

Thanks for reading ... and thanks in advance.
Regard
** Indra **



+++
Prianggada I. Tanaya  Div. of PMA, Dept. of Mech. Eng. KU Leuven
Research Fellow       Celestijnenlaan 300B, 3001-Leuven, Belgium
Phone : +32.16.32.25.31/+32.16.32.24.75   FAX  : +32.16.32.29.87
mailto:Prianggada.IndraTanaya@mech.kuleuven.ac.be
http://www.mech.kuleuven.ac.be/pma
AAA000
Technical Details
Message-ID: <33F96713.3449462@mech.kuleuven.ac.be>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f8d38,a6d7b5f4478feed4,start
X-Google-Attributes: gidf8d38,public
X-Google-Thread: fe201,a6d7b5f4478feed4,start
X-Google-Attributes: gidfe201,public
X-Google-Thread: 108ebe,a6d7b5f4478feed4,start
X-Google-Attributes: gid108ebe,public
From: Prianggada I Tanaya <indra@mech.kuleuven.ac.be>
Subject: Error [Thread]: destroyed before Exit()
Date: 1997/08/19
Message-ID: <33F96713.3449462@mech.kuleuven.ac.be>
X-Deja-AN: 267899898
X-Priority: 3 (Normal)
Organization: Div. PMA Dept. of Mech.Eng. Katholieke Universiteit Leuven
Newsgroups: comp.os.ms-windows.programmer.tools.owl,borland.public.cpp.owl,borland.public.cpp.language