Article View: borland.public.cppbuilder.internet.socket
Article #3658Re: TIdThreadComponent
From: Remy Lebeau (TeamB)
Date: Sun, 14 Aug 2005 19:34
Date: Sun, 14 Aug 2005 19:34
25 lines
1873 bytes
1873 bytes
"Curt" <noemailaddress> wrote in message news:42fe5578$1@newsgroups.borland.com... > I put a call to Start() in Form1->OnCreate() Do NOT use the OnCreate event in C++!!! It is a Delphi remnant that can be triggered before the constructor runs. That is illegal behavior in C++. > but I want to have the thread "started" in a suspended state. Then don't call Start() at all until you are actually ready to run the thread. Or else do not use TIdThreadComponent at all. Use TIdThread or TThread directly instead. The ONLY thing TIdThreadComponent offers is design-time access to the events, which IMHO is not worth the hassle. I few extra lines of code to manage a thread manually can give you a LOT more control over the thread. > The best way I can think of is to call Start() and then immediately call Stop() That is NOT the best way to make a created a suspended thread. Gambit
Technical Details
Message-ID:
<42ff9cc8$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<42fe315e@newsgroups.borland.com> <42fe4c66$3@newsgroups.borland.com> <42fe5578$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,ddd659176ded7d7 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <42fe315e@newsgroups.borland.com> <42fe4c66$3@newsgroups.borland.com> <42fe5578$1@newsgroups.borland.com> Subject: Re: TIdThreadComponent Date: Sun, 14 Aug 2005 12:34:11 -0700 Lines: 27 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: <42ff9cc8$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1124048072 68.69.17.41 (14 Aug 2005 12:34:32 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail