🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Getting a thread's state and CPU utilization

#2715
From: Dennis Jones
Date: Sun, 14 Jan 2007 20:10
26 lines
2100 bytes
"Bob Gonder" <notbg@notmindspring.invalid> wrote in message 
news:up0lq2hp43a79vr8hdd05299c556be7bc8@4ax.com...
> Dennis Jones wrote:
>
>>thread terminates.  So if it is not signalled, all I know is that it 
>>hasn't
>>terminated -- but I want to know whether or not the thread is in a wait
>>state (waiting on a synchronization object).
>
> And for that part, I had suggested adding a thread-data flag that you
> would set before and clear after going into wait-states.


Yeah, sorry...I guess I misread what you had said.  Unfortunately, I don't 
have full control of all source code, so I won't always have the ability to 
set state indicators.  Besides, that would be a lot of effort...it would be 
much nicer to get that information from the OS, which probably has it.


> dead-locks should never happen.

I don't have any (that I am aware of) in my code, but a general method of 
detection would be a nice thing to have in my toolbox.

- Dennis 
Technical Details
Message-ID: <45aa8e3b$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <45a9e77e$1@newsgroups.borland.com> <999kq2l4vmj0mq60qde1gvpcom1l4arf8a@4ax.com> <45aa5fbf$1@newsgroups.borland.com> <45aa675f$1@newsgroups.borland.com> <up0lq2hp43a79vr8hdd05299c556be7bc8@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,2c2b36b510895e0f
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Dennis Jones" <nospam@nospam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <45a9e77e$1@newsgroups.borland.com> <999kq2l4vmj0mq60qde1gvpcom1l4arf8a@4ax.com> <45aa5fbf$1@newsgroups.borland.com> <45aa675f$1@newsgroups.borland.com> <up0lq2hp43a79vr8hdd05299c556be7bc8@4ax.com>
Subject: Re: Getting a thread's state and CPU utilization
Date: Sun, 14 Jan 2007 12:10:53 -0800
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
NNTP-Posting-Host: 71.245.109.58
Message-ID: <45aa8e3b$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1168805435 71.245.109.58 (14 Jan 2007 12:10:35 -0800)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail