Article View: borland.public.cppbuilder.nativeapi
Article #9391Re: Sleep() doesn't work as I'd expect
From: Pete Fraser
Date: Fri, 09 Jul 2004 15:13
Date: Fri, 09 Jul 2004 15:13
22 lines
1853 bytes
1853 bytes
Is your Comms thread using Synchronize to send info back to the main thread? If it is, it might be locking up waiting for the main thread to complete the Sleep() as I think that the main thread won't get messages until the sleep has completed. (I think anyway) HTH Pete "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.
Technical Details
Message-ID:
<40eeb624$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!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 From: "Pete Fraser" <pete._no_spam_fraser@frasersoft.nospam.net> Newsgroups: borland.public.cppbuilder.nativeapi References: <40eea7bc@newsgroups.borland.com> Subject: Re: Sleep() doesn't work as I'd expect Date: Fri, 9 Jul 2004 16:13:40 +0100 Lines: 24 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 195.12.18.1 Message-ID: <40eeb624$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1089386020 195.12.18.1 (9 Jul 2004 08:13:40 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail