🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Threads and CPU Usage

#14706
From: Remy Lebeau (TeamB)
Date: Sun, 03 Aug 2003 19:43
14 lines
1501 bytes
"Joe Walker" <__JoeW@hotmail.com> wrote in message
news:3f2cfdce$1@newsgroups.borland.com...

> What is the best way to handle this messages in
> other threads. (in order to have CPU usage below %100)

As long as you are not running any loops (or just long code) that do not
yield, then you will not use 100% of the CPU.  GetMessage() waits for a
message to appear in the queue before it returns, and it yields internally,
so if that is all your thread is doing, it will not use 100% of the CPU.


Gambit
Technical Details
Message-ID: <3f2d646e$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f2cfdce$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,90beddda6c283d0e
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-08-03 12:39:55 PST
From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f2cfdce$1@newsgroups.borland.com>
Subject: Re: Threads and CPU Usage
Date: Sun, 3 Aug 2003 12:43:23 -0700
Lines: 16
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.1106
NNTP-Posting-Host: 207.175.226.26
Message-ID: <3f2d646e$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1059939438 207.175.226.26 (3 Aug 2003 12:37:18 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail