🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: TThread

#13774
From: Andy
Date: Fri, 12 Sep 2003 17:02
15 lines
1593 bytes
So when should I use Synchronize? 

Andy

>>   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.
Technical Details
Message-ID: <3f61fc43$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3f60e4dc$1@newsgroups.borland.com> <3f6114aa$1@newsgroups.borland.com> <3f61eebb$1@newsgroups.borland.com> <3f61f99e$3@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:09:12 PST
From: "Andy" <andyholcomb@comcast.net>
Sender: "Andy" <andyholcomb@comcast.net>
Reply-To: "Andy" <andyholcomb@comcast.net>
Subject: Re: TThread
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 66.12.8.230 66.12.8.230    
References: <3f60e4dc$1@newsgroups.borland.com> <3f6114aa$1@newsgroups.borland.com> <3f61eebb$1@newsgroups.borland.com> <3f61f99e$3@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.65
Message-ID: <3f61fc43$1@newsgroups.borland.com>
Date: 12 Sep 2003 10:02:59 -0700
X-Trace: newsgroups.borland.com 1063386179 207.105.83.65 (12 Sep 2003 10:02:59 -0700)
Lines: 19
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail