Boost logo

Boost Users :

Subject: Re: [Boost-users] [asio] Error running as Windows service; runs fine from console
From: Evan Burkitt (eburkitt_at_[hidden])
Date: 2010-09-16 23:33:54


"Igor R" <boost.lists_at_[hidden]> wrote in message
news:AANLkTimRvJhmaD95q-Y8UemqFjFZRhcvZPFoLwgxXpj=@mail.gmail.com...
>> Based on your advice I'm going to have to cause the creation of the
>> server
>> instance to be done somewhere other than during the service manager's
>> call
>> to start the service.
>
> Maybe you can just move the all acceptor stuff to server::start().
That won't work; server::start() gets called on the service manager thread,
too, immediately after the ctor. The solution is going to require moving the
creation of the server instance to where it can be done on a persistent
thread. The parameters to server's ctor come from a configuration file (part
of the elided code in my last post), so I could just as easily construct it
in task_scheduler's ctor. Or maybe I'll have a better idea when I get some
uninterrupted time to think about it.

-evan


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net