Article View: borland.public.cppbuilder.deployment
Article #162Re: THREAD with SERIAL COMM
From: Hans Zandbergen
Date: Fri, 09 Sep 2005 09:18
Date: Fri, 09 Sep 2005 09:18
44 lines
2015 bytes
2015 bytes
In article <7so0i1tuctkha7rcs95sfbb0kt71g63n5a@4ax.com>, gcardinali@remove.adhoc.net says... > On Thu, 08 Sep 2005 17:43:00 +0200, \"@t <""fabio(\"@t)techside.it"> wrote: > > >Hi to all. > [snip] > >Any suggestions ? I'm are newer to the thread programming. > >Some links to get documentation about threads in c++ builder ? > > Hi, > > have a look at this library: > > http://sourceforge.net/projects/tpapro > > It's free, stable and well documented. > Also, you don't need to create your own threads, > because the TApdComPort component is already > threaded. > > Giuliano > Hi, Sometimes it is just handy to find out yourself to discover how to use it. To prevent a thread to consume all the cpu time, you need to tel the thread to give back control to other processes. You can do that simple, by including SleepEx(10,true) in your polling loop. or you can use WaitForMultipleObjects(....) (more complicated) Hans Zandbergen
Technical Details
Message-ID:
<MPG.1d8b71cb2e17b15a98968d@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<43205bc7@newsgroups.borland.com> <7so0i1tuctkha7rcs95sfbb0kt71g63n5a@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Thread: f8e54,5fc7742ce46e9625 X-Google-Attributes: gidf8e54,public X-Google-Language: ENGLISH,ASCII-7-bit From: Hans Zandbergen <hans..zandbergen.nospam@leidenscientific.nl> Newsgroups: borland.public.cppbuilder.deployment Subject: Re: THREAD with SERIAL COMM Date: Fri, 9 Sep 2005 11:18:24 +0200 Message-ID: <MPG.1d8b71cb2e17b15a98968d@newsgroups.borland.com> References: <43205bc7@newsgroups.borland.com> <7so0i1tuctkha7rcs95sfbb0kt71g63n5a@4ax.com> Organization: Leiden Scientific B.V. MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit User-Agent: MicroPlanet-Gravity/2.60.2060 NNTP-Posting-Host: 213.84.43.166 X-Trace: newsgroups.borland.com 1126257062 213.84.43.166 (9 Sep 2005 02:11:02 -0700) Lines: 44 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail