Re: Making a Service App use less CPU Resources
From: Anchorman (JesseN0SPAM_at_davinci-mims.com)
Date: 01/14/04
- Next message: Ignacio Vazquez: "Re: Making a Service App use less CPU Resources"
- Previous message: Dean: "Re: Thread issues"
- In reply to: Peter Below (TeamB): "Re: Making a Service App use less CPU Resources"
- Next in thread: Ignacio Vazquez: "Re: Making a Service App use less CPU Resources"
- Reply: Ignacio Vazquez: "Re: Making a Service App use less CPU Resources"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 14 Jan 2004 15:14:15 -0500
Sorry, my bad. I used the wrong terminology. When I said, "form", I wasn't
referring to a visual form (that you drop TLabels and TEdit's on), I was
referring to the white area named "components" that you have when you start
a new service application. I definately don't have any visual forms in my
service app.
As to using the timer. I have since figured out that I shouldn't be using
that, and converted my service app over to use it's own thread for the work
its doing, and removed the timer from the project and I'm now using Sleep.
It seems to be reacting a lot better now, however it is still using a lot of
CPU resources.
Jesse
"Peter Below (TeamB)" <100113.1101@compuXXserve.com> wrote in message
news:VA.0000a882.00567ca0@nomail.please...
> In article <40055407@newsgroups.borland.com>, Anchorman wrote:
> > I just dropped a timer component on the form, and set it's Interval.
>
> Shocking, really <g>. A service app has no business having a form, it has
no
> message loop, it will run (typically) in an environment where it has no
> desktop to create forms on. Services are non-visual. They do their work in
> threads started from the main service thread. In such an environment you
do
> not use timers to wait for an interval, you use Sleep (not indicated for
> larger intervals since you cannot wake the thread to terminate it this
way),
> waitable timers, waits on some kernel object with a timeout, stuff like
that.
>
>
> --
> Peter Below (TeamB)
> Use the newsgroup archives :
> http://www.mers.com/searchsite.html
> http://www.tamaracka.com/search.htm
> http://groups.google.com
> http://www.prolix.be
>
>
- Next message: Ignacio Vazquez: "Re: Making a Service App use less CPU Resources"
- Previous message: Dean: "Re: Thread issues"
- In reply to: Peter Below (TeamB): "Re: Making a Service App use less CPU Resources"
- Next in thread: Ignacio Vazquez: "Re: Making a Service App use less CPU Resources"
- Reply: Ignacio Vazquez: "Re: Making a Service App use less CPU Resources"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|