🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Threads and CPU Usage

#14701
From: Joe Walker
Date: Sun, 03 Aug 2003 17:01
28 lines
1726 bytes
"Joe Walker" <__JoeW@hotmail.com> wrote in message
news:3f2cfdce$1@newsgroups.borland.com...
> while (!Terminated)
>    if (PeekMessage(&msg, NULL, 0,0,PM_REMOVE))
>                         Dispatch(&msg);
> else
>     WaitMessage();
>
> OR
>
>  while (GetMessage(&msg, NULL, 0,0,PM_REMOVE))
                                                                ^^^^^^^^^^^^
                                                                this is not
a parameter of GetMessage of course.. ignore this please..


>     Dispatch(&msg)
>
> OR any other things...
>
> Whatever I do (I think) , CPU usage seems to be %100..
>
> I have also tried Sleep and it doesnt work..
> So what is the best way?
> Note: I have not any windows in my threads...:)
>
> JoeW
Technical Details
Message-ID: <3f2d3fcc@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!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 10:09:38 PST
From: "Joe Walker" <__JoeW@hotmail.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f2cfdce$1@newsgroups.borland.com>
Subject: Re: Threads and CPU Usage
Date: Sun, 3 Aug 2003 20:01:04 +0300
Lines: 30
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 144.122.180.3
Message-ID: <3f2d3fcc@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1059930060 144.122.180.3 (3 Aug 2003 10:01:00 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail