11 class Server_Task
: public ACE_Task_Base
14 Server_Task (const std::string
& args
)
17 ~Server_Task () { this->force_shutdown (); }
21 bool initializer
= false;
23 ACE_GUARD_RETURN (TAO_SYNCH_MUTEX
, ace_mon
, this->mutex_
, -1);
26 ACE_ARGV
my_args (args_
.c_str ());
28 // Initialize Server ORB in new thread
31 server_
= std::make_unique
<Server
> (my_args
.argc (), my_args
.argv ());
33 server_
.reset (new Server(my_args
.argc (), my_args
.argv ()));
44 this->force_shutdown (); // servant thread is responsible for shutdown
58 return server_
->init_
;
64 void force_shutdown ()
74 std::unique_ptr
<Server
> server_
;
75 TAO_SYNCH_MUTEX mutex_
;
78 #endif //_SERVER_TASK_