🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Threads and Timer problem

#14601
From: Paul E.
Date: Mon, 04 Aug 2003 16:11
55 lines
3137 bytes
Thanks maclolm, well first of all I am really so *NEW* to Threads, and I am
not insisting on using Synchronize calls, I am open to any suggestions,
advise from anyone.

My main task is that I have a few functions that must get executed every 5
seconds, so I need to do this in a separate thread other than the main
project thread...so I really need help with how I can change the code I
posted to reach my main task...

So if you can please let me know how I can adjust the code I posted to reach
my task...

BTW I downloaded your tutorial, and it is really good, but a bit high on my
level in threads to understand, also it gives me 2 error when I try to run
the project...

[C++ Warning] main.h(75): W8027 Functions containing while are not expanded
inline
[C++ Error] main.cpp(126): E2369 Cannot use the result of a property
assignment as an rvalue

thanks for your support


"Malcolm Smith" <mjfreelancing@optusnet.com.au> wrote in message
news:3f2e41c5$1@newsgroups.borland.com...
> I forgot to mention, your code is no better than if you dropped a TTimer
on
> the form and made it active from the button click.  Your methods are still
> processed within the context of the main VCL thread because of the
> Synchronize call.
>
> -- 
> Malcolm Smith
> MJ Freelancing- http://www.mjfreelancing.com
> Software Protection for C++Builder
> Borland Technology Partner
>
>
> "Malcolm Smith" <mjfreelancing@optusnet.com.au> wrote in message
> news:3f2e415c$1@newsgroups.borland.com...
> > I'm not sure why you are triggering a TTimer this way.  If you are after
a
> > thread that processes a task after a given period of time check out my
> > tutorials page.  I have just the class for you.  Look for
> TWaitEventThread.
> >
> > -- 
> > Malcolm Smith
> > MJ Freelancing- http://www.mjfreelancing.com
> > Software Protection for C++Builder
> > Borland Technology Partner
> >
>
>
Technical Details
Message-ID: <3f2e85b6@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!news-hog.berkeley.edu!ucberkeley!tethys.csu.net!arclight.uoregon.edu!wn13feed!wn11feed!worldnet.att.net!216.166.71.14!border3.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3f2daa27@newsgroups.borland.com> <3f2e415c$1@newsgroups.borland.com> <3f2e41c5$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,ece7f64e3f770b72
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-08-04 09:40:35 PST
From: "Paul E." <paulepst69@aol.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f2daa27@newsgroups.borland.com> <3f2e415c$1@newsgroups.borland.com> <3f2e41c5$1@newsgroups.borland.com>
Subject: Re: Threads and Timer problem
Date: Mon, 4 Aug 2003 08:11:33 -0800
Lines: 57
Organization: Toshiba
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: 62.135.27.110
Message-ID: <3f2e85b6@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1060013494 62.135.27.110 (4 Aug 2003 09:11:34 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!news-hog.berkeley.edu!ucberkeley!tethys.csu.net!arclight.uoregon.edu!wn13feed!wn11feed!worldnet.att.net!216.166.71.14!border3.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail