Re: Making a Service App use less CPU Resources

From: Anchorman (JesseN0SPAM_at_davinci-mims.com)
Date: 01/14/04


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
>
>



Relevant Pages

  • Timer in C
    ... I'm referring to a thread that I started some days ago on ... ualarm() or setitimersatisfy me completely. ... timer objects (of course, not true objects, but conceptually it's like ... of them (that's why I need some way to refer to every single timer ...
    (comp.unix.programmer)
  • Re: Clock losing time
    ... In article, mjt ... >> Has anyone else experienced this problem, or is it just a coincidence ... >> that my computer's timer may have malfunctioned at the same time I ... Or are you referring to this article? ...
    (alt.os.linux.suse)
  • Re: Hyperlink to a specific object on a Pp slide
    ... There is no timer. ... As long as the cursor is hovering over the object, ... So I don't know what you are referring to. ... >> Sonia Coleman ...
    (microsoft.public.powerpoint)