Article View: borland.public.cppbuilder.nativeapi
Article #9407Re: Sleep() doesn't work as I'd expect
From: Ron Sawyer
Date: Sat, 10 Jul 2004 13:00
Date: Sat, 10 Jul 2004 13:00
20 lines
1812 bytes
1812 bytes
Try a call to Application->ProcessMesssages in the main program loop. "Chris Phillips" <chris.phillips@corusgroup.com> wrote in message news:40eea7bc@newsgroups.borland.com... > > I have an application with 3 threads to it. One thread is simply processing > serial IO but must run close to real-time - I have given it priority > tpTimeCritical. This thread is executed by the main program. However, if > the main program is doing something processor intensive (such as retreiving > a number of database records), then my Comms thread doesn't get a look in > until the processor intensive part has finished. I have put a Sleep command > into the processor intensive loop thinking that it will allow the Comms > thread to continue with its stuff, but to no avail. > > Any suggestions? >
Technical Details
Message-ID:
<40efe85b@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!lnewsoutpeer01.lnd.ops.eu.uu.net!lnewsinpeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40eea7bc@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,f4373c97b27dc766 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Ron Sawyer" <XXXRSAWYER8128XQQXX@aol.com> From: "Ron Sawyer" <XXXRSAWYER8128XQQXX@aol.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <40eea7bc@newsgroups.borland.com> Subject: Re: Sleep() doesn't work as I'd expect Date: Sat, 10 Jul 2004 09:00:31 -0400 Lines: 22 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: 172.162.153.169 Message-ID: <40efe85b@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1089464411 172.162.153.169 (10 Jul 2004 06:00:11 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsoutpeer01.lnd.ops.eu.uu.net!lnewsinpeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail