Article View: borland.public.cppbuilder.nativeapi
Article #9387Sleep() doesn't work as I'd expect
From: Chris Phillips
Date: Fri, 09 Jul 2004 14:12
Date: Fri, 09 Jul 2004 14:12
11 lines
1452 bytes
1452 bytes
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:
<40eea7bc@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,f4373c97b27dc766,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Chris Phillips" <chris.phillips@corusgroup.com> Sender: "Chris Phillips" <chris.phillips@corusgroup.com> Reply-To: "Chris Phillips" <chris.phillips@corusgroup.com> Subject: Sleep() doesn't work as I'd expect Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 145.8.170.249 NNTP-Posting-Host: 207.105.83.66 Message-ID: <40eea7bc@newsgroups.borland.com> Date: 9 Jul 2004 07:12:12 -0700 X-Trace: newsgroups.borland.com 1089382332 207.105.83.66 (9 Jul 2004 07:12:12 -0700) Lines: 12 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail