Re: Win32::Daemon basic concept

[email protected] (ChapSuite)
Newsgroups perl.libwin32
Organization http://groups.google.com
Message-ID <c41d0148-6dea-4737-9fdf-10fd4bafbc54@v14g2000vbc.googlegroups.com>
To answer my own question as far as I understand...

There will be a control thread (er, event thread) that will be running
perpetually -- but the easy model doesn't
have a "worker thread" working all the time -- it only runs
periodically when the RUNNING event goes off.
I mean, you have to code the event handler to do the work at that
point.  That seems a bit clumsy if you want
your worker to be running all the time, but I suppose you could play
IPC or simulated-fork games.

My other problem was that I was trying to use the single-callback
routine model, and for whatever
reason, I had MUCH better luck with the multi-callback-routine model.
I can't prove anything is broken,
but if someone else had problems, I would try that change.

On Jan 20, 11:14 am, [email protected] (ChapSuite) wrote:
> I've read the Win32::Daemon doc once or twice, and started playing
> with some of the calls.  But there's one thing that troubles me --
> does this whole module expect your service to only run
> intermittently?  I'd like my program to run continuously with its own
> sleeps.
>
> The first path I've selected is to have one handler for all the
> callbacks.  It seems that the case for SERVICE_CONTROL_RUNNING should
> turn around and fork
> the main program, but that seems a bit clunky.
>
> Thanks!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.