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, chappaquasu...@yahoo.com (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!

Reply via email to