Article View: borland.public.cppbuilder.nativeapi
Article #13772Re: TThread
From: Remy Lebeau (TeamB)
Date: Fri, 12 Sep 2003 16:52
Date: Fri, 12 Sep 2003 16:52
23 lines
1859 bytes
1859 bytes
"Andy" <andyholcomb@comcast.net> wrote in message news:3f61eebb$1@newsgroups.borland.com... > Synchronize(ThreadFunc); The TThread::Synchronize() method forces the specified method to execute in the context of the main VCL thread, not within the context of the TThread::Execute() method. Because your code is running in the main VCL thread but not letting the main VCL thread process new messages, your application will be frozen for the duration of CountLoop(). In order for this code to work like your other API-based code, you need to remove the call to Synchronize(), just call ThreadFunc() directly, or else move your ThreadFunc() code into Execute() directly. Gambit --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/03
Technical Details
Message-ID:
<3f61f99e$3@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3f60e4dc$1@newsgroups.borland.com> <3f6114aa$1@newsgroups.borland.com> <3f61eebb$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,b3bd84980f619f6 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-09-12 10:04:02 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f60e4dc$1@newsgroups.borland.com> <3f6114aa$1@newsgroups.borland.com> <3f61eebb$1@newsgroups.borland.com> Subject: Re: TThread Date: Fri, 12 Sep 2003 09:52:24 -0700 Lines: 25 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: 207.175.226.26 Message-ID: <3f61f99e$3@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1063385502 207.175.226.26 (12 Sep 2003 09:51:42 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail