🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Sleep() doesn't work as I'd expect

#9413
From: Chris Phillips
Date: Mon, 12 Jul 2004 08:40
35 lines
2293 bytes
No it isn't - as far as I'm aware, the Comms thread is stand alone - filling
a buffer which the main program reads when it can.

Thanks

"Pete Fraser" <pete._no_spam_fraser@frasersoft.nospam.net> wrote in message
news:40eeb624$1@newsgroups.borland.com...
> 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: <40f24e6d@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40eea7bc@newsgroups.borland.com> <40eeb624$1@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: "Chris Phillips" <chris.phillips@corusgroup.com>
From: "Chris Phillips" <chris.phillips@corusgroup.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <40eea7bc@newsgroups.borland.com> <40eeb624$1@newsgroups.borland.com>
Subject: Re: Sleep() doesn't work as I'd expect
Date: Mon, 12 Jul 2004 09:40:12 +0100
Lines: 37
Organization: Corus
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4922.1500
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4939.300
NNTP-Posting-Host: 145.8.171.20
Message-ID: <40f24e6d@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1089621613 145.8.171.20 (12 Jul 2004 01:40:13 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail